Skip to main content

Python SDK

JavaScript/TypeScript SDK

Go SDK

Supported SDK versions

The examples use these stable releases, which include data versioning, all 49 text analyzer presets, keyword facets, native reranking, Bayesian hybrid search, and native embedding configuration: Python SDK 0.12.1 requires Python 3.10–3.13. Go SDK 0.7.1 requires Go 1.22 or later.

Search and embedding configuration

For Bayesian queries, select the candidate budget field based on whether reranking is enabled: Without reranking, the budget is required and must satisfy 1 <= size <= candidateSize <= 100. With reranking, omit the top-level field; the rerank budget defaults to max(50, size) and must satisfy the same bounds. knn.k remains independent. See the complete Bayesian requests for both forms. Existing search defaults are unchanged. Configure native embeddings with an embedding block on a vector field. TypeScript and Go provide IndexConfigsNativeEmbeddingVector; Go wraps this with CreateIndexConfigsUnionNativeEmbeddingVector.

Data versioning support

Start with the SDK examples to create a branch, write to it, and read from a selected ref. The language-specific guides cover tags, aliases, pagination, and bulk uploads. Python also provides async methods; JavaScript/TypeScript uses promises and async iterators, while Go uses context.Context. For analyzer support through the SDKs, CLI, and MCP server, see analyzer SDK compatibility. REST timestamps use Unix epoch milliseconds. Python exposes numeric timestamps with datetime helpers such as created_at_dt; the TypeScript collection-scoped client returns Date values; Go provides time getters. Branch parent and snapshot fields can be null, so check them before accessing their fields.

Compatibility clients

Qdrant SDK compatibility

Use Qdrant-style Python and TypeScript clients during Qdrant-to-LambdaDB application migrations.

MCP

If you want to use LambdaDB from an MCP client such as Claude Desktop, see the MCP guide:

Use with MCP

Client lifecycle

Python: LambdaDB supports context manager usage. __enter__ returns the client, and __exit__ calls client.close() (closing the SDK-owned HTTP client) and makes the client unusable after the with block. If you don’t use with, call client.close() when you’re done. If you pass a custom client=/async_client=, you own closing it.
JavaScript/TypeScript: the SDK uses the platform fetch API and does not expose a close() method. In most environments there’s nothing to close explicitly. To cancel requests, pass an AbortSignal (for example via request fetchOptions.signal). If you provide your own fetch/HTTP implementation to the SDK, you own its lifecycle.
Go: the SDK uses net/http and does not require an explicit Close() in typical usage. Responses are closed internally. If you provide a custom http.Client/Transport, you own its lifecycle (for example, managing idle connections) and should shut it down according to your application’s needs.