Typed clients, generated from the contract.
IngaDB supplies TypeScript and Python clients generated from the same API definition used to verify the server. Both cover the complete graph-to-analysis workflow.
TYPE SCRIPT@cognitech/ingadb
Fetch-based generated functions and exported request/response types.
PYTHONinga-db-api-client
Sync and async clients with typed models built on HTTPX.
TypeScript
Create one client and pass it to generated operations. This local example uses the development headers.
client.tsTypeScript
import { createClient } from "@hey-api/client-fetch";
import { createGraph, computeAnalysisView } from "@cognitech/ingadb";
const client = createClient({
baseUrl: "http://localhost:9876",
headers: { "X-Org-Id": process.env.INGADB_ORG_ID! },
});
const { data: graph } = await createGraph({
client,
body: { name: "packaging-line" },
});
const { data: view } = await computeAnalysisView({
client,
path: { graphId: graph!.id },
body: {},
});Python
The Python client exposes blocking and asyncio variants for every operation.
client.pyPython
from inga_db_api_client import AuthenticatedClient
from inga_db_api_client.api.graphs import create_graph
from inga_db_api_client.models import CreateGraphBody
client = AuthenticatedClient(
base_url="https://api.your-domain.com",
token=os.environ["INGADB_TOKEN"],
)
graph = create_graph.sync(
client=client,
body=CreateGraphBody(name="packaging-line"),
)
print(graph.id)Client rules
- Reuse the client. Keep connection pooling and shared headers in one configured instance.
- Treat types as contract. Regenerate clients when the API definition changes; do not hand-edit generated files.
- Check errors explicitly. TypeScript operations return data or error; Python offers detailed response variants.
- Carry one credential. Use Bearer authentication outside local development.
Client distribution
For current SDK packaging and integration information, contact [email protected].