SDKs
Choose a language and understand which SDK version each example requires.
Use an SDK to send database requests from your application. Start with your language, then check its version before copying an example.
- Choose your languageOpen the SDK’s source and setup guide.
- Check its release instructionsConfirm the version and installation method.
- Configure a server-side connectionUse the complete address and token from Connect.
- Run a small readInspect the returned result before building a larger workflow.
Choose your language
The SDKs are available on GitHub. Choose a language for installation instructions and working examples. These guides use the 1.0 source candidate; install it from the linked repository.
| Language | Get started | Public source |
|---|---|---|
| Read the guide | GitHub | |
| Read the guide | GitHub | |
| Read the guide | GitHub | |
| Installation and examples | GitHub | |
| Installation and examples | GitHub | |
| Installation and examples | GitHub | |
| Installation and examples | GitHub | |
| Installation and examples | GitHub |
The 1.0 source is public, but the new packages are not on registries yet. npm and PyPI still serve earlier APIs; an unversioned install will not install the Client examples in these guides. To use HTTP directly, start with API authentication.
What the candidate supports
Creating a client connects your application; it does not create tables, generate embeddings or index your text. Prepare the data for the operation you want to call.
| Task | SDK namespace | What it does |
|---|---|---|
| Run SQL | sql | Send parameterized statements and inspect complete results. |
| Define data | schemas | List schemas, read a schema or register TOML. |
| Read and write records | rows | Get a record, put a record or send a batch. |
| Search by meaning | vector | Store vectors, search nearby vectors or delete one. |
| Search text | fts | Index text; run ranked, boolean or phrase searches. |
| Follow relationships | graph | Run Cypher, find neighbors or walk a graph. |
Usage and query metrics are also available. Method names follow each language's conventions. Your database must support the operation, and your credential must have permission to use it. Advanced helpers can differ between languages.
Connect to a database
Set two server-side environment variables:
| Variable | Value |
|---|---|
OC_URL | The complete HTTPS database address from Connect. Keep its path unchanged. |
OC_TOKEN | The credential shown for that connection. |
The candidate appends operation paths to OC_URL; you do not build a tenant URL yourself. PostgreSQL tools use a separate database login, not these SDK settings. See API authentication for connection availability and credential types.
Read the complete result
Read a query result in two parts: the returned data and the outcome of the operation.
| You need to know | Read |
|---|---|
| Which records matched? | Rows with their column metadata. |
| Did a write finish? | Confirmed write counts, when provided; buffered counts alone do not confirm a commit. |
| Did every statement finish? | Nested statement results and any partial batch error. |
| Why did search return this item? | Its record ID and the score for the chosen search method. |
sql.run returns rows, column metadata, confirmed write counts, nested statement results and the original response. A missing write count means unknown, not zero. A batch can partially succeed; inspect its partial results before repeating any statement.
Full-text results contain hits and optional facets in every search mode. Numeric and date/time strings are preserved rather than silently converted.
Timeouts and retries
The candidate uses a 60-second default timeout and does not retry requests automatically. Ruby applies that timeout to connection, read and write inactivity. Redirects are not followed.
A timeout, cancellation or 503 can happen after a write commits. Check the outcome before retrying. An idempotency key does not make arbitrary SQL safe to replay. Python and TypeScript retain explicit retry options for existing integrations.
Diagnose a failed request
Record the SDK version, operation, HTTP status and request ID when available. Keep tokens and private query results out of logs. A protocol error is different from a valid empty result.
Source versions
Use the candidate README at a verified source commit for setup. Registry releases remain separate; a source update does not publish a package.
| Language | Candidate source |
|---|---|
| Python | Source and setup |
| TypeScript / JavaScript | Source and setup |
| Go | Source and setup |
| Rust | Source and setup |
| Java | Source and setup |
| C# | Source and setup |
| PHP | Source and setup |
| Ruby | Source and setup |
Read the API reference · Create your first table · Use the CLI