Skip to main content

VantaDB × OpenAI

PyO3 cdylib that exposes a VantaDBOpenAI class — wraps OpenAI's embedding API with VantaDB for local vector storage and hybrid search.

Install

Not on PyPI yet. The vantadb-openai wheel builds on all release platforms; it goes live with the first providers-v* tag release. Until then, build from a repo checkout.

From PyPI (after the first release)

pip install vantadb-openai

The OpenAI SDK is installed automatically (openai>=1.0,<2).

From source

Requires Python 3.11+ and the OpenAI SDK. Build the extension with maturin:

pip install openai
maturin develop --release

Quickstart

from vantadb_openai import VantaDBOpenAI

store = VantaDBOpenAI("/tmp/vantadb-openai", api_key="sk-...")
emb = store.embed(["hello world"])
rid = store.store("hello world", emb[0], metadata={"lang": "en"})
results = store.search("openai_store", emb[0], top_k=5)
print(rid, results)

API

Method Signature Description
embed embed(texts) -> list[list[float]] Generate embeddings via OpenAI's API.
store store(text, embedding, metadata=None, key=None) -> str Store a record; returns "<namespace>:<key>". key upserts at a deterministic key, else auto-generated. Metadata values must be str/bool/int/float.
search search(namespace, query_embedding, text_query=None, filters=None, distance_metric=None, top_k=10) -> list[dict] Hybrid vector + BM25 search (distance_metric: "cosine" or "euclidean"/"l2"). Returns full records plus score.
get get(namespace, key) -> dict | None Retrieve a single record, or None if not found.
list list(namespace, limit=100, cursor=None) -> dict Paginated listing: {"records": [...], "next_cursor": int | None}.
delete delete(key, namespace=None) -> bool Delete a record by key; defaults to the instance namespace.
list_namespaces list_namespaces() -> list[str] All namespaces containing at least one record.

Constructor options: VantaDBOpenAI(db_path, api_key, model="text-embedding-3-small", namespace="openai_store", timeout=None).

Metadata

Release files for vantadb-openai 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vantadb-openai 0.9.0
File
vantadb_openai-0.9.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
vantadb_openai-0.9.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
vantadb_openai-0.9.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
vantadb_openai-0.9.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 7.4 MB

Release files / vantadb_openai-0.9.0-cp311-abi3-win_amd64.whl

Download URL vantadb_openai-0.9.0-cp311-abi3-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d67160d644ae07aa3b497388a622fb29c4d54a4433d70e36eac83409fd3f92ba
BLAKE2b-256 checksum
How to use checksums
1d9905afb5e85f47eb7d634420ae936d3bb653ccc5c4c84984bfa2ffd6510552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_openai-0.9.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL vantadb_openai-0.9.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
ee15c62a64812dcac864253da5f2d73b5e591d2d45c261d9c73a3e6ed46074c8
BLAKE2b-256 checksum
How to use checksums
de9a253637faa5ae991b649fa474e67485f8e26a315835c3e7764cc846c8ebb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_openai-0.9.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL vantadb_openai-0.9.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
15dad5ed4dabfefb80ed135ffb652c07d1e9f5a44deb6826b45798766393dc55
BLAKE2b-256 checksum
How to use checksums
3283f909e6074fb71210d5859ee8ed1742c61503810021613d7e1cd7898ab798
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_openai-0.9.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL vantadb_openai-0.9.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.8 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
65373b9ae373b9c0627198967e3ff0ee7b17f854695f3acd2a3b52c29c198422
BLAKE2b-256 checksum
How to use checksums
67848731053d22c97bc0ccdec82807d23ad04e9a11fbcad137bd1b9e0f1d5f60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for vantadb-openai 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.9.0 This release

4 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page