Python and Node SDKs
Python and Node clients over the same HTTP API — Cypher, streaming reads, atomic writes, schema, search and the graph lifecycle. The module is invariantdb in both languages. .NET and Go also expose typed governance operations; confirm version and package details in the engine reference.
From a pinned, hash-checked URL
Neither client is published to PyPI or the public npm registry. Install from the InvariantDB URL — pip and npm verify the file against its hash and refuse a mismatch. Don’t run a bare pip install invariantdb or npm install invariantdb against the public registries.
pip checks the wheel against the #sha256= in the URL; npm records the integrity hash in package-lock.json.
Create a client
The key is a gq_-prefixed API key. Both clients also accept a bearer token if you’d rather not use a managed key.
Run a query
Node and edge values arrive with their envelopes flattened — plain objects and dicts, not nested {node: {…}} wrappers.
Cursors for large results
Stream a big result set instead of materializing it. Cursors are read-only — mutations on the cursor route are refused.
Pre-resolved batches
Write operations bypass the Cypher parser and apply a pre-resolved batch — cheaper at high throughput than CREATE/MERGE in Cypher. Values are wrapped to the engine’s tagged format for you.
Operation shapes: createNode, createEdge, updateNodeProperties, updateEdgeProperties, deleteNode, detachDeleteNode, deleteEdge.
Lifecycle and declarations
Every schema.put appends a new version; c.schema.history(graph) lists them. Field-level access, cryptographic erasure and vector-index selection all read from these declarations.
Full-text and vector
Hits are ranked best-first. The engine picks flat or HNSW automatically from the schema declaration and label size.
Use the run harness for bounded agent execution.
Python and Node provide a client-side harness for scoped agent runs. The harness manages delegated credentials, trace lifecycle, budgets, tool policies and revocation. The .NET and Go SDKs also provide typed calls for leases, budgets, receipts and authority. Check the SDK version and API reference for exact signatures and feature availability.
Consult the installed SDK documentation for invocation signatures and configuration. Tracked read validation applies to supported read-session shapes. Future-dated single-label reads are covered by the reported fix; transaction-integrated tracking and relationship-read tracking require separate version verification. Use explicit revision conditions where tracking coverage is unavailable.