SDKs
Three first-party clients over the same HTTP API. Python has the widest surface and is the only one that retries transient failures for you; TypeScript adds a separate control-plane client for instances, access and billing; Go has zero third-party dependencies and wraps the query surfaces only.
What each one covers
Every client wraps the same endpoints, but they were not built at the same time and they do not cover the same ground. Read down the column you plan to use, not across.
| Python 0.6.0 | TypeScript 0.4.0 | Go v2.0.0 | |
|---|---|---|---|
| Schemas: list, get, register | yes | yes | not yet |
| Rows: get, put, batch put | yes | not yet | not yet |
| SQL: query and single-row | yes | yes | yes |
| SQL: execute, materialized views | yes | not yet | not yet |
| Vector: put, top-k | yes | yes | yes |
| Vector: delete | yes | yes | not yet |
| Vector: centroids, training, rebalance | yes | not yet | not yet |
| Full-text: index, search | yes | yes | yes |
| Full-text: synonyms, stopwords | yes | not yet | not yet |
| Graph: neighbours, BFS, path, Dijkstra | yes | yes | yes |
| Graph: PageRank, Louvain, betweenness and friends | yes | not yet | not yet |
| Natural language ask | yes | yes | yes |
| Usage | yes | yes | yes |
| Control plane: instances, access, billing | not yet | yes | not yet |
| Async variant | yes, AsyncOriginChain | native | context |
A gap in a column is not a gap in the product. Every one of those calls is an ordinary HTTP request, documented in the HTTP API reference - the client simply has not wrapped it yet. Reach for the endpoint directly and nothing else changes.
None of them speak Elasticsearch
OriginChainDB exposes an Elasticsearch-compatible API, and the point of it is that you keep the client you already have. None of our SDKs wrap it, deliberately - a second hand-rolled search client would drift from the compatibility surface it is meant to mirror. Point the official Elasticsearch client at your instance instead: the Elasticsearch quickstart shows the connection. Elasticsearch is a trademark of Elasticsearch B.V., which is not affiliated with OriginChainDB and does not endorse it.
Authentication is the same everywhere
Three values, whichever client you pick: the endpoint of your instance, a bearer token, and a tenant id. The TypeScript and Go clients derive the tenant from the endpoint's first DNS label, so you usually pass two. Find all three in the console on your instance page.
export OC_BASE_URL='https://t-abc.your-region.db.originchain.ai'
export OC_BEARER='oc_live_...'
export OC_TENANT='t-abc'Tokens are per instance and carry whatever role you issued them with, so roles and permissions apply to SDK calls exactly as they do to raw HTTP. Keep them in a secrets manager; none of the clients read a config file from disk.
Retries: only one of the three does it for you
This is the difference most likely to bite you, so it is worth being blunt about. All three attach an Idempotency-Key to every mutating request, which is what makes a retry safe. Only Python actually performs the retry.
| Automatic idempotency key | Retries transient failures | |
|---|---|---|
| Python | yes | yes - 429, 500, 502, 503 and 504, up to max_retries |
| TypeScript | yes | no - write your own loop |
| Go | yes | no - write your own loop |
In TypeScript and Go, a retry you write yourself is still safe: the key travels with the request, and the engine's server-side cache collapses the duplicate. What you do not get is the loop.
Packages and source
| Language | Install | Source |
|---|---|---|
| Python | pip install originchain | originchain-ai/originchain-python |
| TypeScript | npm install @originchain/sdk | originchain-ai/originchain-typescript |
| Go | go get github.com/originchain-ai/originchain-go | originchain-ai/originchain-go |
Prefer no dependency at all? The HTTP API is the whole product: every one of these clients is a wrapper over it, and anything they have not wrapped is one request away.