Skip to main content

garphield

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.

Metadata

Release files for garphield 0.1.11

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

Source distribution (sdist)

Source distribution for garphield 0.1.11
File Size Uploaded
garphield-0.1.11.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for garphield 0.1.11
File Interpreter ABI Platform
garphield-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / garphield-0.1.11.tar.gz

Download URL garphield-0.1.11.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
eb6744b7aaf26fa8f68436387a4613242a043874d104f7b160cfa5bc9eb2bb30
BLAKE2b-256 checksum
How to use checksums
3009a559b6de02981a42d0eb3fc7617e66874bde5f0fcbf1b39450e5ab18fc57
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 12, 2026.

Transparency log

Release files / garphield-0.1.11-py3-none-any.whl

Download URL garphield-0.1.11-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d8dba386bfb7b1179342bbe26c1e4bdf8cbb3750321422676e2e7ebd029e4081
BLAKE2b-256 checksum
How to use checksums
3a9be4b920a3345a0e3b87fb3eae79b4aa4207d15b09cf4c8b9b0774bb710715
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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