{ "info": { "author": "thautwarm", "author_email": "twshere@outlook.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "\n.. image:: https://travis-ci.org/thautwarm/graphviz-artist.svg?branch=master\n :target: https://travis-ci.org/thautwarm/graphviz-artist\n\n.. image:: https://img.shields.io/pypi/v/graphviz-artist.svg\n :target: https://pypi.python.org/pypi/graphviz-artist\n\n.. image:: https://codecov.io/gh/thautwarm/graphviz-artist/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/thautwarm/graphviz-artist\n\n.. image:: https://img.shields.io/pypi/pyversions/graphviz-artist.svg\n :target: https://pypi.org/project/graphviz-artist/\n\n.. image:: https://img.shields.io/badge/license-mit-teal.svg\n :target: https://pypi.org/project/graphviz-artist/\n\nGraphviz-Artist\n===============\n\n\nYou just become an artist in graph drawing once you start using\n``Graphviz-Artist``.\n\nIf you don't have the demand of fine-grained controling upon generated\ngraphs, the learning curve of graphviz-artist is actually horizontal.\n\nThis package provides a higher-level encapsulation for the python\npackage `graphviz `__, and you\nmight want to have a try at the latter.\n\nInstallation\n------------\n\n- Install `Graphviz `__.\n- ``pip install graphviz-artist``\n\nQuickstart\n----------\n\n\nUndirected Graph\n~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n import graphviz_artist as ga\n\n # make a graph\n g = ga.Graph()\n\n # make nodes\n n1 = g.new()\n n2 = g.new()\n n3 = g.new()\n\n # (>), (==) and (<) could create edges for graphs.\n # n2 > n3 / n3 < n2 : there is an edge n2 -> n3\n # (==) will be introduced later, as it's only meaningful to directed edges.\n _ = n1 > n2 > n3 > n1\n\n g.view()\n\n.. image:: https://raw.githubusercontent.com/thautwarm/graphviz-artist/master/imgs/test_1.png\n :width: 500px\n :align: center\n\nDirected Graph\n~~~~~~~~~~~~~~\n\n.. code:: python\n\n import graphviz_artist as ga\n\n # use attr module to see which Graphviz Attributes\n # could be auto-completed.\n import graphviz_artist.attr as attr\n\n # use HorizontalGraph\n g = ga.Graph(attr.HorizontalGraph)\n\n # `attr.Shape(\"\")` to specify the shape of nodes.\n n1 = g.new(attr.Label('hey'), attr.Shape.diamond)\n n2 = g.new(attr.Label('hey'), attr.Shape.hexagon)\n n3 = g.new(attr.Label('you'), attr.Shape.star)\n\n # `attr.Directed()` makes a directed edge.\n directed = attr.Directed()\n\n # `attr.Label` to specify the text that edges display\n edge_label = attr.Label(\"passed_here\")\n\n # `attr.Penwidth` to decide the width of edge glyph.\n edge_size = attr.Penwidth(2.)\n\n # in `a < b[b_to_c_attrs...] > c`, the edge `b -> c` will have attribute `b_to_c_attrs`.\n _ = n3[directed, edge_label, edge_size] > n1[directed] == n2 > n3\n\n g.view()\n\n.. image:: https://raw.githubusercontent.com/thautwarm/graphviz-artist/master/imgs/test_2.png\n :width: 500px\n :align: center\n\n\n\nExpression Tree\n~~~~~~~~~~~~~~~\n\n.. code:: python\n\n import graphviz_artist as ga\n import graphviz_artist.attr as attr\n\n # make a graph\n g = ga.Graph(directed=True)\n\n new = g.new\n\n # decl nodes\n false = new(attr.Label(\"False\"))\n true = new(attr.Label(\"True\"))\n not_ = new(attr.Label(\"not\"))\n and_ = new(attr.Label(\"and\"))\n\n unary1 = new(attr.Label(\"unary\"))\n unary2 = new(attr.Label(\"unary\"))\n binary = new(attr.Label(\"binary\"), attr.Width(2), attr.Shape.box)\n expr = new(attr.Label(\"expr\"))\n\n # build graph\n _ = false > unary1 < not_\n _ = true > unary2\n\n _ = and_[attr.Label('Op')] > binary\n\n # XLabel: For edges, the label will be placed near the center of the edge.\n _ = unary1[attr.XLabel(\"Left operand\")] > binary\n _ = unary2[attr.XLabel('Right operand')] > binary\n _ = binary > expr\n\n g.view()\n\n\n.. image:: https://raw.githubusercontent.com/thautwarm/graphviz-artist/master/imgs/test_3.png\n :width: 500px\n :align: center\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thautwarm/graphviz-artist", "keywords": "graphviz,graph-drawing,dsl", "license": "mit", "maintainer": "", "maintainer_email": "", "name": "graphviz-artist", "package_url": "https://pypi.org/project/graphviz-artist/", "platform": "any", "project_url": "https://pypi.org/project/graphviz-artist/", "project_urls": { "Homepage": "https://github.com/thautwarm/graphviz-artist" }, "release_url": "https://pypi.org/project/graphviz-artist/0.2.0/", "requires_dist": [ "graphviz", "typing" ], "requires_python": "", "summary": "A chance to focus on graph drawing itself, forget APIs and other stuffs.", "version": "0.2.0" }, "last_serial": 5110014, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "a187b53846ee363287c3382d3848c8dc", "sha256": "c84cb03156263f2414d2f1edb6129927c3534eae6cde3db8de7ebfb42275bbae" }, "downloads": -1, "filename": "graphviz_artist-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a187b53846ee363287c3382d3848c8dc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5279, "upload_time": "2019-03-29T18:47:32", "url": "https://files.pythonhosted.org/packages/1b/66/184f33754062ff3cb7e90070ea1f56438e9f1387e50fc880907991bc83bf/graphviz_artist-0.1.3-py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7249cb5d7fb183fad1b7f877e229f011", "sha256": "72cc55052286d253db40b8d7dabc0a4c0e1136cedec8e258d53f220607db511d" }, "downloads": -1, "filename": "graphviz_artist-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7249cb5d7fb183fad1b7f877e229f011", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5247, "upload_time": "2019-04-07T13:52:32", "url": "https://files.pythonhosted.org/packages/1e/6f/4eaa2d7ad08f1f80fd507e907728ad9d4467663e1ad3236e76daea2fac4f/graphviz_artist-0.2.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7249cb5d7fb183fad1b7f877e229f011", "sha256": "72cc55052286d253db40b8d7dabc0a4c0e1136cedec8e258d53f220607db511d" }, "downloads": -1, "filename": "graphviz_artist-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7249cb5d7fb183fad1b7f877e229f011", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5247, "upload_time": "2019-04-07T13:52:32", "url": "https://files.pythonhosted.org/packages/1e/6f/4eaa2d7ad08f1f80fd507e907728ad9d4467663e1ad3236e76daea2fac4f/graphviz_artist-0.2.0-py3-none-any.whl" } ] }