garphield for Python
Interactive graph visualization for Python notebooks. Pass a NetworkX
graph or pandas DataFrame to show() and get a WebGL-rendered view
inline. Select nodes, bind visual properties to algorithms, apply
force-directed layouts, annotate structure, then round-trip the result
back to Python or export standalone HTML.
import garphield as gph
import networkx as nx
G = nx.karate_club_graph()
view = gph.show(
G,
node_color="club",
node_size=G.degree,
node_label=str,
)
Once the view is displayed, drive it from Python:
view.select([0, 1, 2]).fit()
view.bind("node_color", gph.algorithm("louvain", resolution=1.1))
edited = view.to_project()
Install
pip install garphield
With NetworkX and pandas adapters:
pip install 'garphield[tables,networkx]'
From pandas
import pandas as pd
import garphield as gph
edges = pd.DataFrame({"source": ["a"], "target": ["b"], "weight": [1.5]})
project = gph.Project.from_pandas(edges)
tables = project.to_pandas()
Project files
Read, validate, and write .gph project files:
import garphield as gph
project = gph.Project.load("project.gph")
print(project.semantic_fingerprint())
project.save("project-copy.gph")
Project.save() writes deterministic, human-readable JSON. Semantic and
project fingerprints use RFC 8785/JCS canonical bytes.
Notebook round-trip
The wheel carries a version-matched notebook renderer. Use Open in Garphield to continue in the full workbench at garphield.com, then Return to notebook to bring the result back to Python.
Use chrome=["minimap"] or chrome=["toolbar"] to keep embeds
lightweight. project.save_html("graph.html", chrome=["minimap"]) writes
an interactive HTML shell that loads Garphield's remote /embed renderer. It
requires network access and a browser/host context that permits framing.
Create a complete project URL without opening a browser or uploading data:
url = gph.share_url(project)
share_string() and share_url() validate and encode locally. Links above the
262,144-character inline limit raise ProjectShareTooLargeError; use a .gph
file for larger projects.
Local Jupyter, VS Code notebooks, JupyterHub, Google Colab, and Snowflake Snowpark notebooks are supported.
Links
Metadata
Release files for garphield 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| garphield-0.1.10.tar.gz | 1.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| garphield-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.2 MB
Release files / garphield-0.1.10.tar.gz
| Download URL | garphield-0.1.10.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc3a1e31c5e9eb76f42ad02861204a1c144ab79488254d8f4d47817df7175e9e
|
|
BLAKE2b-256 checksum How to use checksums |
0d21865975da33bca80980c99256a05cbae96ed4e1b807cbcb4899ff47630574
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / garphield-0.1.10-py3-none-any.whl
| Download URL | garphield-0.1.10-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
499fa1c3b909568ed50f5f8110c75083ffceab74576844ea4ecf5c869d541ba3
|
|
BLAKE2b-256 checksum How to use checksums |
5a27d24af371d3f1da252f5ae3cb243072dea25b6a462d0aeb0104f09da9f9a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency log