{"library":"pydotplus","title":"pydotplus","description":"PyDotPlus is a Python interface to Graphviz's Dot language, acting as an improved version of the original `pydot` project. It allows users to programmatically create, read, and manipulate graphs defined in the DOT language and render them into various image formats using Graphviz. The current version is 2.0.2, with its last release in December 2014, indicating a maintenance rather than active development cadence.","language":"python","status":"maintenance","last_verified":"Sun May 17","install":{"commands":["pip install pydotplus"],"cli":null},"imports":["import pydotplus\ngraph = pydotplus.Dot()","import pydotplus\ngraph = pydotplus.graph_from_dot_data(dot_string)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pydotplus\nimport os\n\n# Create a directed graph\ngraph = pydotplus.Dot(graph_type='digraph')\n\n# Add nodes\nnode_a = pydotplus.Node(\"A\", style=\"filled\", fillcolor=\"red\")\nnode_b = pydotplus.Node(\"B\", style=\"filled\", fillcolor=\"green\")\nnode_c = pydotplus.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\nedge_ab = pydotplus.Edge(\"A\", \"B\", label=\"connects\")\nedge_bc = pydotplus.Edge(\"B\", \"C\", arrowhead=\"open\")\n\ngraph.add_edge(edge_ab)\ngraph.add_edge(edge_bc)\n\n# Try to save the graph to a file\ntry:\n    # This requires Graphviz to be installed and its executables in the system PATH\n    output_file = \"simple_graph.png\"\n    graph.write_png(output_file)\n    print(f\"Graph '{output_file}' created successfully.\")\nexcept pydotplus.graphviz.InvocationException as e:\n    print(f\"Error: Graphviz executables not found or not in PATH. {e}\")\n    print(\"Please install Graphviz (https://graphviz.org/download/) and add its 'bin' directory to your system's PATH environment variable.\")\n    print(\"For example, on Windows: ';C:\\Program Files (x86)\\Graphviz2.38\\bin' should be added to PATH.\")\n    print(\"On Linux/macOS, ensure Graphviz is installed via package manager and 'dot' command is accessible.\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\n\n# Example of loading from DOT data\ndot_data = \"digraph { A -> B; B -> C; }\"\nloaded_graph = pydotplus.graph_from_dot_data(dot_data)\n# loaded_graph.write_svg(\"loaded_graph.svg\") # Uncomment to save","lang":"python","description":"This quickstart demonstrates how to create a simple directed graph with nodes and edges using `pydotplus` and then attempts to render it to a PNG image. It also includes an example of loading a graph from a DOT string. **Crucially, for the rendering step to succeed, Graphviz must be installed on your system and its `bin` directory must be added to your system's PATH environment variable.**","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"2.0.2","pypi_latest":"2.0.2","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.5,"avg_import_s":0.29,"wheel_type":"sdist"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.27,"mem_mb":8.2,"disk_size":"20.3M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":2.1,"import_time_s":0.21,"mem_mb":8.2,"disk_size":"21M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.37,"mem_mb":8.6,"disk_size":"22.9M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":2.2,"import_time_s":0.35,"mem_mb":8.6,"disk_size":"23M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.34,"mem_mb":8.5,"disk_size":"12.8M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":3.2,"import_time_s":0.35,"mem_mb":8.5,"disk_size":"13M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.32,"mem_mb":8.7,"disk_size":"12.5M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":2.8,"import_time_s":0.31,"mem_mb":8.7,"disk_size":"13M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.22,"mem_mb":7.9,"disk_size":"19.9M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pydotplus","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.19,"mem_mb":7.9,"disk_size":"20M"}]}}