{"id":13494050,"url":"https://github.com/xflr6/graphviz","last_synced_at":"2025-05-13T19:15:34.176Z","repository":{"id":13164315,"uuid":"15847241","full_name":"xflr6/graphviz","owner":"xflr6","description":"Simple Python interface for Graphviz","archived":false,"fork":false,"pushed_at":"2024-05-13T18:30:44.000Z","size":1779,"stargazers_count":1703,"open_issues_count":13,"forks_count":215,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-27T20:01:49.434Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://graphviz.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xflr6.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-12T17:49:29.000Z","updated_at":"2025-04-24T04:28:49.000Z","dependencies_parsed_at":"2023-10-16T03:19:56.766Z","dependency_job_id":"b6c63bfe-420e-43dd-a047-ee818fd786fe","html_url":"https://github.com/xflr6/graphviz","commit_stats":{"total_commits":1208,"total_committers":21,"mean_commits":"57.523809523809526","dds":"0.019039735099337762","last_synced_commit":"b85a7a8664a2050b5d10f5616d01cf26ac9b5e9a"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xflr6%2Fgraphviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xflr6%2Fgraphviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xflr6%2Fgraphviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xflr6%2Fgraphviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xflr6","download_url":"https://codeload.github.com/xflr6/graphviz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010821,"owners_count":21999002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:01:21.284Z","updated_at":"2025-05-13T19:15:34.134Z","avatar_url":"https://github.com/xflr6.png","language":"Python","funding_links":[],"categories":["Python","数据可视化","Data Visualization","Documentation","others","其他_机器学习与深度学习","Uncategorized"],"sub_categories":["Data Management","Uncategorized"],"readme":"Graphviz\n========\n\n|PyPI version| |License| |Supported Python| |Wheel| |Downloads|\n\n|Build| |Codecov| |Readthedocs-stable| |Readthedocs-latest|\n\n|Binder-stable|\n\nThis package facilitates the creation and rendering of graph descriptions in\nthe DOT_ language of the Graphviz_ graph drawing software (`upstream repo`_)\nfrom Python.\n\nCreate a graph object, assemble the graph by adding nodes and edges, and\nretrieve its DOT source code string. Save the source code to a file and render\nit with the Graphviz installation of your system.\n\nUse the ``view`` option/method to directly inspect the resulting (PDF, PNG,\nSVG, etc.) file with its default application. Graphs can also be rendered\nand displayed within `Jupyter notebooks`_ (formerly known as\n`IPython notebooks`_,\n`example \u003cnotebook_\u003e`_, `nbviewer \u003cnotebook-nbviewer_\u003e`_)\nas well as the `Jupyter QtConsole`_.\n\n\nLinks\n-----\n\n- GitHub: https://github.com/xflr6/graphviz\n- PyPI: https://pypi.org/project/graphviz/\n- Documentation: https://graphviz.readthedocs.io\n- Changelog: https://graphviz.readthedocs.io/en/latest/changelog.html\n- Issue Tracker: https://github.com/xflr6/graphviz/issues\n- Download: https://pypi.org/project/graphviz/#files\n- Development documentation: https://graphviz.readthedocs.io/en/latest/development.html\n- Release process: https://graphviz.readthedocs.io/en/latest/release_process.html\n\n\nInstallation\n------------\n\nThis package runs under Python 3.8+, use pip_ to install:\n\n.. code:: bash\n\n    $ pip install graphviz\n\nTo render the generated DOT source code, you also need to install Graphviz_\n(`download page \u003cupstream-download_\u003e`_,\n`archived versions \u003cupstream-archived_\u003e`_,\n`installation procedure for Windows \u003cupstream-windows_\u003e`_).\n\nMake sure that the directory containing the ``dot`` executable is on your\nsystems' ``PATH``\n(sometimes done by the installer;\nsetting ``PATH``\non `Linux \u003cset-path-linux_\u003e`_,\n`Mac \u003cset-path-darwin_\u003e`_,\nand `Windows \u003cset-path-windows_\u003e`_).\n\nAnaconda_: see the conda-forge_ package\n`conda-forge/python-graphviz \u003cconda-forge-python-graphviz_\u003e`_\n(`feedstock \u003cconda-forge-python-graphviz-feedstock_\u003e`_),\nwhich should automatically ``conda install``\n`conda-forge/graphviz \u003cconda-forge-graphviz_\u003e`_\n(`feedstock \u003cconda-forge-graphviz-feedstock_\u003e`_) as dependency.\n\n\nQuickstart\n----------\n\nCreate a graph object:\n\n.. code:: python\n\n    \u003e\u003e\u003e import graphviz  # doctest: +NO_EXE\n    \u003e\u003e\u003e dot = graphviz.Digraph(comment='The Round Table')\n    \u003e\u003e\u003e dot  #doctest: +ELLIPSIS\n    \u003cgraphviz.graphs.Digraph object at 0x...\u003e\n\nAdd nodes and edges:\n\n.. code:: python\n\n    \u003e\u003e\u003e dot.node('A', 'King Arthur')  # doctest: +NO_EXE\n    \u003e\u003e\u003e dot.node('B', 'Sir Bedevere the Wise')\n    \u003e\u003e\u003e dot.node('L', 'Sir Lancelot the Brave')\n\n    \u003e\u003e\u003e dot.edges(['AB', 'AL'])\n    \u003e\u003e\u003e dot.edge('B', 'L', constraint='false')\n\nCheck the generated source code:\n\n.. code:: python\n\n    \u003e\u003e\u003e print(dot.source)  # doctest: +NORMALIZE_WHITESPACE +NO_EXE\n    // The Round Table\n    digraph {\n        A [label=\"King Arthur\"]\n        B [label=\"Sir Bedevere the Wise\"]\n        L [label=\"Sir Lancelot the Brave\"]\n        A -\u003e B\n        A -\u003e L\n        B -\u003e L [constraint=false]\n    }\n\nSave and render the source code (skip/ignore any ``doctest_mark_exe()`` lines):\n\n.. code:: python\n\n    \u003e\u003e\u003e doctest_mark_exe()  # skip this line\n\n    \u003e\u003e\u003e dot.render('doctest-output/round-table.gv').replace('\\\\', '/')\n    'doctest-output/round-table.gv.pdf'\n\nSave and render and view the result:\n\n.. code:: python\n\n    \u003e\u003e\u003e doctest_mark_exe()  # skip this line\n\n    \u003e\u003e\u003e dot.render('doctest-output/round-table.gv', view=True)  # doctest: +SKIP\n    'doctest-output/round-table.gv.pdf'\n\n.. image:: https://raw.github.com/xflr6/graphviz/master/docs/_static/round-table.svg\n    :align: center\n    :alt: round-table.svg\n\n**Caveat:**\nBackslash-escapes and strings of the form ``\u003c...\u003e``\nhave a special meaning in the DOT language.\nIf you need to render arbitrary strings (e.g. from user input),\ncheck the details in the `user guide`_.\n\n\nSee also\n--------\n\n- pygraphviz_ |--| full-blown interface wrapping the Graphviz C library with SWIG\n- graphviz-python_ |--| official Python bindings\n  (`documentation \u003cgraphviz-python-docs_\u003e`_)\n- pydot_ |--| stable pure-Python approach, requires pyparsing\n\n\nLicense\n-------\n\nThis package is distributed under the `MIT license`_.\n\n\n.. _Graphviz:  https://www.graphviz.org\n.. _DOT: https://www.graphviz.org/doc/info/lang.html\n.. _upstream repo: https://gitlab.com/graphviz/graphviz/\n.. _upstream-download: https://www.graphviz.org/download/\n.. _upstream-archived: https://www2.graphviz.org/Archive/stable/\n.. _upstream-windows: https://forum.graphviz.org/t/new-simplified-installation-procedure-on-windows/224\n\n.. _set-path-windows: https://www.computerhope.com/issues/ch000549.htm\n.. _set-path-linux: https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux-unix\n.. _set-path-darwin: https://stackoverflow.com/questions/22465332/setting-path-environment-variable-in-osx-permanently\n\n.. _pip: https://pip.pypa.io\n\n.. _Jupyter notebooks: https://jupyter.org\n.. _IPython notebooks: https://ipython.org/notebook.html\n.. _Jupyter QtConsole: https://qtconsole.readthedocs.io\n\n.. _notebook: https://github.com/xflr6/graphviz/blob/master/examples/graphviz-notebook.ipynb\n.. _notebook-nbviewer: https://nbviewer.org/github/xflr6/graphviz/blob/master/examples/graphviz-notebook.ipynb\n\n.. _Anaconda: https://docs.anaconda.com/anaconda/install/\n.. _conda-forge: https://conda-forge.org\n.. _conda-forge-python-graphviz: https://anaconda.org/conda-forge/python-graphviz\n.. _conda-forge-python-graphviz-feedstock: https://github.com/conda-forge/python-graphviz-feedstock\n.. _conda-forge-graphviz: https://anaconda.org/conda-forge/graphviz\n.. _conda-forge-graphviz-feedstock: https://github.com/conda-forge/graphviz-feedstock\n\n.. _user guide: https://graphviz.readthedocs.io/en/stable/manual.html\n\n.. _pygraphviz: https://pypi.org/project/pygraphviz/\n.. _graphviz-python: https://pypi.org/project/graphviz-python/\n.. _graphviz-python-docs: https://www.graphviz.org/pdf/gv.3python.pdf\n.. _pydot: https://pypi.org/project/pydot/\n\n.. _MIT license: https://opensource.org/licenses/MIT\n\n\n.. |--| unicode:: U+2013\n\n\n.. |PyPI version| image:: https://img.shields.io/pypi/v/graphviz.svg\n    :target: https://pypi.org/project/graphviz/\n    :alt: Latest PyPI Version\n.. |License| image:: https://img.shields.io/pypi/l/graphviz.svg\n    :target: https://github.com/xflr6/graphviz/blob/master/LICENSE.txt\n    :alt: License\n.. |Supported Python| image:: https://img.shields.io/pypi/pyversions/graphviz.svg\n    :target: https://pypi.org/project/graphviz/\n    :alt: Supported Python Versions\n.. |Wheel| image:: https://img.shields.io/pypi/wheel/graphviz.svg\n    :target: https://pypi.org/project/graphviz/#files\n    :alt: Wheel format\n.. |Downloads| image::  https://img.shields.io/pypi/dm/graphviz.svg\n    :target: https://pypistats.org/packages/graphviz\n    :alt: Monthly downloads\n\n.. |Build| image:: https://github.com/xflr6/graphviz/actions/workflows/build.yaml/badge.svg?branch=master\n    :target: https://github.com/xflr6/graphviz/actions/workflows/build.yaml?query=branch%3Amaster\n    :alt: Build\n.. |Codecov| image:: https://codecov.io/gh/xflr6/graphviz/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/xflr6/graphviz\n    :alt: Codecov\n.. |Readthedocs-stable| image:: https://readthedocs.org/projects/graphviz/badge/?version=stable\n    :target: https://graphviz.readthedocs.io/en/stable/\n    :alt: Readthedocs (stable)\n.. |Readthedocs-latest| image:: https://readthedocs.org/projects/graphviz/badge/?version=latest\n    :target: https://graphviz.readthedocs.io/en/latest/\n    :alt: Readthedocs (latest)\n\n.. |Binder-stable| image:: https://img.shields.io/badge/launch-binder%20(stable)-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG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bdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC\n    :target: https://mybinder.org/v2/gh/xflr6/graphviz/stable\n    :alt: Binder (stable)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxflr6%2Fgraphviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxflr6%2Fgraphviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxflr6%2Fgraphviz/lists"}