Skip to main content

python-graphviz-plus

A set of graph and network visualization utilities that extend graphviz, networkx, and pandas. Highly optimized for generating clean, elegant, and styled graphs in both Jupyter Notebooks and standard Python scripts.

Github

https://github.com/Santt997/python-graphviz-plus

Key Features

  • AdjacencyList: Parse edge lists (traditional ll representation) or dictionaries of neighbor tuples. Easily convert these structures into Pandas DataFrames for quick inspection and tabular formatting.
  • BlackNeatoGraph: An elegant Graphviz-based class using the neato layout engine. Renders beautiful dark-themed networks with circular nodes, custom positioning (pos), overlap prevention, and automatic styling. Provides direct helpers to check graph properties (e.g., maximum/minimum degrees, regularity).
  • ValencyList: A specialized helper class to calculate, analyze, and manage the degrees (valency) of all nodes in a graph. Features handshake lemma validation, regular graph detection, and sorted list exports.

Installation

You can install python-graphviz-plus directly from PyPI:

pip install python-graphviz-plus

Quick Start

1. Generating a Black Neato Graph

from graph import BlackNeatoGraph

# Define an edge list (source, destination)
edges = [
    ("A", "B"),
    ("B", "C"),
    ("C", "A"),
    ("C", "D")
]

# Position mapping for nodes (optional)
positions = [
    ("A", "0,0!"),
    ("B", "1,1!"),
    ("C", "2,0!"),
    ("D", "3,-1!")
]

# Create and render the black graph
g = BlackNeatoGraph(ll=edges, lp=positions, name="MyBeautifulGraph")

# Inside a Jupyter Notebook, it will render inline:
# g
# Or save to a file:
g.render("graph_output", format="png", cleanup=True)

2. Inspecting Node Valencies

from graph import ValencyList

# Analyze the valencies from the edge list
valencies = ValencyList(edges)

print("Degrees mapping:", valencies.raw())
print("Is regular graph?", valencies.is_regular())
print("Handshake lemma holds?", valencies.sum_check())

3. Converting to a Tabular Adjacency Matrix / DataFrame

from graph import AdjacencyList

adj = AdjacencyList(edges)
df = adj.to_dataframe()

# Display as pandas DataFrame
print(df)

Requirements

  • Python >= 3.8
  • graphviz
  • networkx
  • pandas

Note: Ensure that the Graphviz system binaries (dot, neato, etc.) are installed on your system path.

Metadata

Release files for python-graphviz-plus 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-graphviz-plus 0.1.6
File Size Uploaded Provenance
python_graphviz_plus-0.1.6.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-graphviz-plus 0.1.6
File Interpreter ABI Platform
python_graphviz_plus-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / python_graphviz_plus-0.1.6.tar.gz

Download URL python_graphviz_plus-0.1.6.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0f7924a4c40ad1b1e9d79576e5ed3b624fcd59a8e1a97662ecc12221098aeb90
BLAKE2b-256 checksum
How to use checksums
5e8d4292cb3db7649b1b51ea1ef9f68b894c59de57792ff1c0e6f73873a1d1de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / python_graphviz_plus-0.1.6-py3-none-any.whl

Download URL python_graphviz_plus-0.1.6-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf2d5b4ff425c4fc57df9cb6121cbf1cd39ad16df05bea6c484a508a90cfc402
BLAKE2b-256 checksum
How to use checksums
520419971d8d1e967c296ccb2a3bca862ec905ae3e8441d07302c43907966363
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for python-graphviz-plus 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page