Official client libraries for AnythingGraph.
This repository (AnythingGraph/sdk) contains Python, Node.js, and Go SDKs. The platform services (data-layer, RDF cache, connector, dashboard) live in the main OSS repo.
HTTP client libraries for the AnythingGraph stack:
| Service | Default URL | SDK module |
|---|---|---|
| data-layer-service | http://127.0.0.1:8182 |
data_layer / dataLayer / datalayer |
| rdf-cache-service | http://127.0.0.1:8181 |
rdf_cache / rdfCache / rdfcache |
| connector-service | http://127.0.0.1:8183 |
connector |
| dashboard API | http://127.0.0.1:5180 |
dashboard |
python/ # pip install -e ./python
nodejs/ # npm install ./nodejs
golang/ # go get github.com/anythinggraph/anythinggraph-sdk/anythinggraph
cd python && pip install -e .
python examples/supply_chain.pyfrom anythinggraph import AnythingGraphClient
client = AnythingGraphClient()
print(client.data_layer.health())cd nodejs && npm install
node examples/example.js
node examples/supply-chain.jsimport { AnythingGraphClient } from 'anythinggraph-sdk';
const client = new AnythingGraphClient();
const health = await client.dataLayer.health();
const playbooks = await client.dashboard.listPlaybooks();cd golang && go build ./...
go run ./examples/supply-chain/import "github.com/anythinggraph/anythinggraph-sdk/anythinggraph"
client := anythinggraph.NewClient(nil)
health, err := client.DataLayer.Health(context.Background())| Variable | Used by |
|---|---|
DATA_LAYER_URL |
data-layer client |
RDF_CACHE_URL |
rdf-cache client |
CONNECTOR_URL |
connector client |
DASHBOARD_API_URL |
dashboard client |
Pass subject_id and playbook_id on data-layer row and relationship list calls when using enforced playbooks (e.g. hr-relationship-access, crm-relationship-access). Headers: X-Ontox-Subject-Id, X-Ontox-Playbook-Id.
Use dashboard.playbook_webhook(playbook_id, payload) or build a full connector context and call connector.ingest(context, payload).