Skip to main content

Python SDK

JavaScript/TypeScript SDK

Go SDK

SDK and tool versions

The examples cover the stable SDK releases below. These SDKs support data versioning, all 49 text analyzer presets, keyword facets, native reranking with the typesafe and cohere providers, Bayesian hybrid search, native embeddings with text and image sources, index field descriptions, consistent reads through an alias that targets a branch, and the current query, fetch, and list limits. The tools listed below support their respective workflows; see their guides for available operations and limits: Installation guides use the latest stable releases; pin a version when reproducibility matters and verify compatibility before upgrading. The LambdaDB CLI has a smaller document-list page limit than the API; use pagination or --all for more. The Migration CLI is intended for migration workflows. Python SDK 0.15.0 requires Python 3.10–3.13. Go SDK 0.9.0 requires Go 1.22 or later. The CLI and MCP server require Node.js 22.14.0 or later. Update the specific client or tool you use; updating an application’s SDK does not update a separately installed CLI, MCP server, or Migration CLI.

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 within the candidate limit. 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. Its sources list holds EmbeddingSource objects in every SDK. TypeScript and Go provide IndexConfigsNativeEmbeddingVector; Go wraps this with CreateIndexConfigsUnionNativeEmbeddingVector.

Field descriptions and consistent reads

Every index config type carries an optional field description: Python exposes description on the IndexConfigs, IndexConfigsText, IndexConfigsVector, and IndexConfigsObject models and their TypedDicts; TypeScript types it as FieldDescription (description?: string | null) on every variant; Go adds Description *string to every IndexConfigs* struct, and lambdadb.String("") clears a stored description on update. Consistent reads accept a branch ref or an alias ref in every SDK. Python (consistent_read=True) raises a ValueError for a tag ref and TypeScript (consistentRead: true) rejects a tag ref before sending a request; Go sends the request and surfaces the server’s 400. An alias that targets a tag is rejected by the server in every SDK.

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. 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 the MCP server

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.