PyGraphistry Connectors
Doc routing (local + canonical)
- First route with
../pygraphistry/references/pygraphistry-readthedocs-toc.md.
- Use
../pygraphistry/references/pygraphistry-readthedocs-top-level.tsv for section-level shortcuts.
- Only scan
../pygraphistry/references/pygraphistry-readthedocs-sitemap.xml when 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.
Strategy
- Prefer dataframe-first ingestion when practical, then bind with
edges()/nodes().
- Use connector-specific notebook patterns when auth/query semantics are specialized.
- For very large datasets, push filtering/aggregation upstream before plotting.
- Keep connector and Graphistry credentials in env vars or secret stores; no hardcoded keys.
- Never use placeholder literals like
username='user' / password='pass' / username='...'; use os.environ[...] or os.environ.get(...).
- For concise tasks, respond with a single compact code block and minimal prose.
- In concise snippets, prefer explicit privacy literals (
'private' or 'organization') over placeholder variables.
Connector triage rubric
- Use native graph-db connectors (
cypher(), Neptune/TigerGraph flows) when traversal is best expressed upstream.
- For local Cypher-style queries on in-memory PyGraphistry graphs (no external DB), use
g.gfql("MATCH ..."). Note: graphistry.cypher() is a distinct Neo4j/Memgraph/Neptune connector, not the same as local GFQL Cypher.
- Use SQL/log source extraction when your source is tabular or SIEM-centric, then bind in PyGraphistry.
- If unsure, start with source-native query -> dataframe ->
edges()/nodes(), then optimize connector depth.
Connector families
- Graph DBs: Neo4j, Neptune, TigerGraph, Memgraph, Arango.
- Data/SQL: Databricks, PostgreSQL, Spanner, warehouse-style pipelines.
- Logs/SIEM: Splunk, Kusto, AlienVault.
- Compute/layout plugins: networkx, graphviz, cugraph, igraph, hypernetx.
Minimal examples
# Neo4j/Memgraph/Neptune connector (runs query on external DB server)
g = graphistry.cypher('MATCH (a)-[r]->(b) RETURN a,b,r')
g.plot()
# Local Cypher via GFQL (no external DB needed — preferred for local graphs)
g2 = g.gfql("MATCH (a)-[r]->(b) WHERE a.score > 10 RETURN a.id, b.id")
# Graphistry org/service-account auth before connector workflows
graphistry.register(
api=3,
org_name=os.environ.get('GRAPHISTRY_ORG_NAME'),
personal_key_id=os.environ.get('GRAPHISTRY_PERSONAL_KEY_ID'),
personal_key_secret=os.environ.get('GRAPHISTRY_PERSONAL_KEY_SECRET')
)
# Generic dataframe path after source-specific query/extract
# edges_df: src,dst,...
g = graphistry.edges(edges_df, 'src', 'dst')
graphistry.privacy(mode='private')
plot_url = g.plot(render=False)
# Connector-oriented flow with explicit nodes + focused GFQL slice
# Example source can be Neo4j/Splunk -> dataframe extraction
g = graphistry.edges(edges_df, 'src', 'dst').nodes(nodes_df, 'id')
g_focus = g.gfql([...]).name('connector-slice')
graphistry.privacy(mode='organization')
plot_url = g_focus.plot(render=False)
Canonical docs
1---2name: pygraphistry-connectors3description: PyGraphistry connector workflows for external data sources and graph databases. Use when asked to "connect graphistry to Neo4j", "load from Splunk into graphistry", "query Kusto/ADX and visualize", "Databricks graph", "TigerGraph with pygraphistry", "ingest SQL into a graph", or any "graphistry + [external platform]" request. Also triggers on Neptune, Postgres, BigQuery, Memgraph, or connector/plugin keywords. Proactively suggest when the user has data in an external system and wants graph visualization without first loading it into a DataFrame.4---56# PyGraphistry Connectors78## Doc routing (local + canonical)9- First route with `../pygraphistry/references/pygraphistry-readthedocs-toc.md`.10- Use `../pygraphistry/references/pygraphistry-readthedocs-top-level.tsv` for section-level shortcuts.11- Only scan `../pygraphistry/references/pygraphistry-readthedocs-sitemap.xml` when a needed page is missing.12- Use one batched discovery read before deep-page reads; avoid `cat *` and serial micro-reads.13- In user-facing answers, prefer canonical `https://pygraphistry.readthedocs.io/en/latest/...` links.1415## Strategy16- Prefer dataframe-first ingestion when practical, then bind with `edges()/nodes()`.17- Use connector-specific notebook patterns when auth/query semantics are specialized.18- For very large datasets, push filtering/aggregation upstream before plotting.19- Keep connector and Graphistry credentials in env vars or secret stores; no hardcoded keys.20- Never use placeholder literals like `username='user'` / `password='pass'` / `username='...'`; use `os.environ[...]` or `os.environ.get(...)`.21- For concise tasks, respond with a single compact code block and minimal prose.22- In concise snippets, prefer explicit privacy literals (`'private'` or `'organization'`) over placeholder variables.2324## Connector triage rubric25- Use native graph-db connectors (`cypher()`, Neptune/TigerGraph flows) when traversal is best expressed upstream.26- For local Cypher-style queries on in-memory PyGraphistry graphs (no external DB), use `g.gfql("MATCH ...")`. Note: `graphistry.cypher()` is a distinct Neo4j/Memgraph/Neptune connector, not the same as local GFQL Cypher.27- Use SQL/log source extraction when your source is tabular or SIEM-centric, then bind in PyGraphistry.28- If unsure, start with source-native query -> dataframe -> `edges()/nodes()`, then optimize connector depth.2930## Connector families31- Graph DBs: Neo4j, Neptune, TigerGraph, Memgraph, Arango.32- Data/SQL: Databricks, PostgreSQL, Spanner, warehouse-style pipelines.33- Logs/SIEM: Splunk, Kusto, AlienVault.34- Compute/layout plugins: networkx, graphviz, cugraph, igraph, hypernetx.3536## Minimal examples37```python38# Neo4j/Memgraph/Neptune connector (runs query on external DB server)39g = graphistry.cypher('MATCH (a)-[r]->(b) RETURN a,b,r')40g.plot()41```4243```python44# Local Cypher via GFQL (no external DB needed — preferred for local graphs)45g2 = g.gfql("MATCH (a)-[r]->(b) WHERE a.score > 10 RETURN a.id, b.id")46```4748```python49# Graphistry org/service-account auth before connector workflows50graphistry.register(51 api=3,52 org_name=os.environ.get('GRAPHISTRY_ORG_NAME'),53 personal_key_id=os.environ.get('GRAPHISTRY_PERSONAL_KEY_ID'),54 personal_key_secret=os.environ.get('GRAPHISTRY_PERSONAL_KEY_SECRET')55)56```5758```python59# Generic dataframe path after source-specific query/extract60# edges_df: src,dst,...61g = graphistry.edges(edges_df, 'src', 'dst')62graphistry.privacy(mode='private')63plot_url = g.plot(render=False)64```6566```python67# Connector-oriented flow with explicit nodes + focused GFQL slice68# Example source can be Neo4j/Splunk -> dataframe extraction69g = graphistry.edges(edges_df, 'src', 'dst').nodes(nodes_df, 'id')70g_focus = g.gfql([...]).name('connector-slice')71graphistry.privacy(mode='organization')72plot_url = g_focus.plot(render=False)73```7475## Canonical docs76- Plugins overview: https://pygraphistry.readthedocs.io/en/latest/plugins.html77- Connector notebooks: https://pygraphistry.readthedocs.io/en/latest/notebooks/plugins.connectors.html78- Compute/layout plugin notebooks: https://pygraphistry.readthedocs.io/en/latest/notebooks/plugins.compute.html79- Notebooks index: https://pygraphistry.readthedocs.io/en/latest/notebooks/index.html