Registry / serialization / GvGen

GvGen

JSON →
library1.0pypypiunverified

GvGen is a Python class designed to generate Graphviz DOT files, which are used to describe graphs. It provides a simple API for creating nodes, defining connections (edges), and applying various Graphviz properties to customize the appearance of the graph. The library simplifies the programmatic creation of complex graph structures, with its current version 1.0 focusing on stable functionality since its release in February 2020.

serialization
pip install GvGen
Install & Compatibility
Where this runs
tested against v1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GvGen
from gvgen import GvGen
from gvgen import GvGen

This quickstart demonstrates how to create a simple directed graph with nodes and edges using GvGen, apply basic styling, and then generate a Graphviz DOT file. It also provides instructions for rendering the DOT file into an image using the Graphviz command-line tool.

import os from gvgen import GvGen # Create a new graph instance graph = GvGen() # Create some nodes node_a = graph.newItem("NodeA") node_b = graph.newItem("NodeB") node_c = graph.newItem("NodeC") # Link nodes graph.newLink(node_a, node_b) graph.newLink(node_b, node_c, label="path") graph.newLink(node_c, node_a, "back-ref", style='dotted') # Add some properties to a node graph.property(node_a, 'color', 'red') graph.property(node_b, 'shape', 'box') # Output the DOT source to a file dot_file_path = "example_graph.dot" with open(dot_file_path, "w") as f: graph.dot(f) print(f"DOT file generated at: {dot_file_path}") print("To render this graph, ensure Graphviz is installed and run: ") print(f" dot -Tpng {dot_file_path} -o example_graph.png") print(f" xdg-open example_graph.png # On Linux to view")
Debug
Known issues
gotchaGvGen strictly generates Graphviz DOT files and does not include functionality to render these files into images (e.g., PNG, SVG, PDF). You must have the Graphviz command-line tools (e.g., `dot`, `neato`) installed on your system to convert the generated `.dot` files into visual graphs.
fix
Install the Graphviz software suite on your operating system (e.g., `sudo apt-get install graphviz` on Debian/Ubuntu, `brew install graphviz` on macOS).
affects: 1.0
deprecatedThe GvGen library has not seen active development or new releases since version 1.0 in February 2020. While functional, it is in a maintenance state, meaning new features or prompt updates for major Python changes are unlikely. Users seeking more actively maintained or feature-rich Graphviz Python bindings might consider alternatives like the official `graphviz` Python package.
fix
Be aware of the library's maintenance status. For new projects or if encountering issues with newer Python versions, consider using actively maintained alternatives like `pip install graphviz` (the official Graphviz Python binding) which offers similar functionality and active support.
affects: 1.0
Upgrade
Version history
1.0latest on PyPI
Audit
Dependencies
GraphvizrequiredGvGen generates '.dot' files. To render these files into image formats (like PNG, SVG, PDF), the Graphviz command-line utilities (e.g., 'dot' command) must be installed on the system. GvGen does not perform rendering itself.
Agent activity
97 hits · last 30 days
node
26
claudebot
4
ahrefsbot
3
petalbot
2
amazonbot
1
bytedance
1
Resources