Loading...
Loading...
Core PyGraphistry workflow for authentication, shaping edges/nodes/hypergraphs, and plotting. Use for first-run setup, converting tables to graphs, and producing an initial interactive graph quickly and safely.
npx skill4agent add graphistry/graphistry-skills pygraphistry-core../pygraphistry/references/pygraphistry-readthedocs-toc.md../pygraphistry/references/pygraphistry-readthedocs-top-level.tsv../pygraphistry/references/pygraphistry-readthedocs-sitemap.xmlcat *https://pygraphistry.readthedocs.io/en/latest/...import os
import graphistry
graphistry.register(
api=3,
username=os.environ.get('GRAPHISTRY_USERNAME'),
password=os.environ.get('GRAPHISTRY_PASSWORD')
)# 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()# Build graph from multiple entity columns in one table
hg = graphistry.hypergraph(df, ['actor', 'event', 'location'])
hg['graph'].plot()src/dst/idtypeg = graphistry.edges(edges_df, 'src', 'dst').materialize_nodes()g.materialize_nodes().gfql([...]).gfql("MATCH ...")hop()chain()