pygraphistry-core
PyGraphistry Core
Doc routing (local + canonical)
- First route with
../pygraphistry/references/pygraphistry-readthedocs-toc.md. - Use
../pygraphistry/references/pygraphistry-readthedocs-top-level.tsvfor section-level shortcuts. - Only scan
../pygraphistry/references/pygraphistry-readthedocs-sitemap.xmlwhen a needed page is missing. - Use one batched discovery read before deep-page reads; avoid
cat *and serial micro-reads. - In user-facing answers, prefer canonical
https://pygraphistry.readthedocs.io/en/latest/...links.
Quick workflow
- Register to a Graphistry server.
- Build graph from edges/nodes (or hypergraph from wide rows).
- Bind visual columns as needed.
- Plot and iterate.
Minimal baseline
import os
import graphistry
graphistry.register(
api=3,
username=os.environ.get('GRAPHISTRY_USERNAME'),
password=os.environ.get('GRAPHISTRY_PASSWORD')
)
Auth variants (org + key flows)
# Organization-scoped login (SSO or user/pass org routing)
graphistry.register(api=3, org_name=os.environ['GRAPHISTRY_ORG_NAME'], idp_name=os.environ.get('GRAPHISTRY_IDP_NAME'))
# Service account / personal key flow
graphistry.register(
api=3,
personal_key_id=os.environ['GRAPHISTRY_PERSONAL_KEY_ID'],
personal_key_secret=os.environ['GRAPHISTRY_PERSONAL_KEY_SECRET']
)
# edges_df: src,dst,... and nodes_df: id,...
edges_df['type'] = edges_df.get('type', 'transaction')
nodes_df['type'] = nodes_df.get('type', 'entity')
g = graphistry.edges(edges_df, 'src', 'dst').nodes(nodes_df, 'id')
g.plot()
Hypergraph baseline
# Build graph from multiple entity columns in one table
hg = graphistry.hypergraph(df, ['actor', 'event', 'location'])
hg['graph'].plot()
ETL shaping checklist
- Normalize identifier columns before binding (
src/dst/idtype consistency, null handling). - Prefer a plain
typecolumn on both edges and nodes for legend-friendly defaults and consistent category encodings. - Deduplicate high-volume repeated rows before first upload.
- Materialize nodes for node-centric steps:
g = graphistry.edges(edges_df, 'src', 'dst').materialize_nodes()
Practical checks
- Confirm source/destination columns are non-null and correctly typed.
- Materialize nodes if needed (
g.materialize_nodes()) before node-centric operations. - Start with smaller slices for first render on large data.
- For neighborhood expansion and pattern mining, always use
.gfql([...])or.gfql("MATCH ..."). The methodshop()andchain()are deprecated. - Keep credentials in environment variables only; do not hardcode usernames/passwords/tokens.
Canonical docs
- Core 10min: https://pygraphistry.readthedocs.io/en/latest/10min.html
- Register/auth: https://pygraphistry.readthedocs.io/en/latest/server/register.html
- Install: https://pygraphistry.readthedocs.io/en/latest/install/index.html
- For analysts/devs notebooks: https://pygraphistry.readthedocs.io/en/latest/notebooks/intro.html
- Loading/shaping + AI combos: https://pygraphistry.readthedocs.io/en/latest/gfql/combo.html
More from graphistry/graphistry-skills
pygraphistry-visualization
Build PyGraphistry visualizations with bindings, encodings, layout controls, static export, and privacy-aware sharing. Use for color/size/icon/badge styling, layout tuning, map/static output, and plot link sharing workflows.
27pygraphistry-connectors
Select and use PyGraphistry connector and plugin workflows for graph databases, SQL/data platforms, SIEM/log sources, and layout/compute plugins. Use when requests involve Neo4j/Neptune/Splunk/Kusto/Databricks/SQL/TigerGraph and similar integrations.
25pygraphistry
TOC router for PyGraphistry tasks. Use when a request involves PyGraphistry and you need to choose the right workflow: loading/ETL shaping, visualization/layout/sharing, GFQL queries (Cypher, chain-lists, Let/DAG, GRAPH constructors), AI/UMAP/embed/semantic-search workflows, or connector-specific ingestion.
24pygraphistry-ai
Apply PyGraphistry graph ML/AI workflows such as UMAP, DBSCAN, embedding-based anomaly analysis, and fit/transform pipelines on nodes or edges. Use for feature-driven exploration, clustering, anomaly triage, and graph-AI notebook workflows.
24pygraphistry-gfql
Construct and run GFQL graph queries in PyGraphistry using chain-list syntax OR Cypher strings. Covers pattern matching, hop constraints, predicates, let/DAG bindings, GRAPH constructors, and remote execution. Use when requests involve subgraph extraction, path-style matching, Cypher queries, or GPU/remote graph query workflows.
24graphistry
Umbrella router for Graphistry workflows across SDK and API surfaces. Use to dispatch between Python SDK, REST API, and (future) JavaScript SDK workflows.
17