{"library":"pydot-ng","title":"pydot-ng: Python interface to Graphviz's Dot (Archived)","description":"Pydot-ng is an archived Python interface to Graphviz's Dot language, enabling programmatic creation, manipulation, and rendering of graphs. It was originally created to provide Python 2 and 3 compatibility as a fork of the original pydot. The last stable version is 2.0.0, released in October 2018. This project is no longer actively maintained, and users are strongly advised to use the actively developed `pydot` library instead.","language":"python","status":"abandoned","last_verified":"Sun May 17","install":{"commands":["pip install pydot-ng"],"cli":null},"imports":["import pydot_ng","from pydot_ng import Graph","from pydot_ng import Node","from pydot_ng import Edge"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pydot_ng as pydot\nimport os\n\n# NOTE: pydot-ng is archived. It is highly recommended to use 'pydot' instead.\n# For Graphviz to work, ensure it is installed on your system and 'dot' is in your PATH.\n# On Linux: sudo apt-get install graphviz\n# On macOS: brew install graphviz\n# On Windows: Download from graphviz.org and add 'bin' to PATH.\n\n# Create a graph\ngraph = pydot.Dot('my_graph', graph_type='digraph')\n\n# Add nodes\nnode_a = pydot.Node('A', style='filled', fillcolor='red')\nnode_b = pydot.Node('B', style='filled', fillcolor='green')\nnode_c = pydot.Node('C', style='filled', fillcolor='blue')\n\ngraph.add_node(node_a)\ngraph.add_node(node_b)\ngraph.add_node(node_c)\n\n# Add edges\ngraph.add_edge(pydot.Edge(node_a, node_b))\ngraph.add_edge(pydot.Edge(node_b, node_c, label='Connects'))\n\n# Save the graph to a file\ntry:\n    # Using a temporary file for demonstration\n    output_file = 'quickstart_graph.png'\n    graph.write_png(output_file)\n    print(f\"Graph saved to {output_file}\")\nexcept Exception as e:\n    print(f\"Error generating graph: {e}\")\n    print(\"Please ensure Graphviz is installed and its 'dot' executable is in your system's PATH.\")\n\n# Clean up the generated file for demonstration purposes (optional)\n# if os.path.exists(output_file):\n#     os.remove(output_file)\n","lang":"python","description":"This quickstart demonstrates how to create a simple directed graph with nodes and edges using pydot-ng and save it as a PNG image. It includes important warnings about the project's archived status and the Graphviz system dependency. For new projects, use the 'pydot' library.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"2.0.0","pypi_latest":"2.0.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.6,"avg_import_s":0.29,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.27,"mem_mb":8.8,"disk_size":"18.9M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0.22,"mem_mb":8.8,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.38,"mem_mb":9.8,"disk_size":"20.9M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.6,"import_time_s":0.31,"mem_mb":9.8,"disk_size":"21M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.34,"mem_mb":9.4,"disk_size":"12.7M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0.33,"mem_mb":9.4,"disk_size":"13M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.33,"mem_mb":9.6,"disk_size":"12.5M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0.32,"mem_mb":9.6,"disk_size":"13M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.23,"mem_mb":8.6,"disk_size":"18.4M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pydot-ng","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.8,"import_time_s":0.2,"mem_mb":8.6,"disk_size":"19M"}]}}