Skip to main content

VantaDB × Ollama

PyO3 cdylib that exposes a VantaDBOllama class — wraps Ollama's local embedding API with VantaDB for local vector storage and hybrid search. No API key required.

Install

Not on PyPI yet. The vantadb-ollama 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-ollama

The Ollama SDK is installed automatically (ollama>=0.4,<1).

From source

Requires Python 3.11+, a running Ollama server, and the Ollama SDK. Build the extension with maturin:

pip install ollama
maturin develop --release

Quickstart

from vantadb_ollama import VantaDBOllama

store = VantaDBOllama("/tmp/vantadb-ollama")  # base_url defaults to http://localhost:11434
emb = store.embed(["hello world"])
rid = store.store("hello world", emb[0], metadata={"lang": "en"})
results = store.search("ollama_store", emb[0], top_k=5)
print(rid, results)

API

Method Signature Description
embed embed(texts) -> list[list[float]] Generate embeddings via Ollama's /api/embed.
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 {id, text, score} per hit.
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": [...], "cursor": str} when a next page exists.
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: VantaDBOllama(db_path, base_url="http://localhost:11434", model="nomic-embed-text", namespace="ollama_store", timeout=None).

Metadata

Release files for vantadb-ollama 0.8.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-ollama 0.8.0
File
vantadb_ollama-0.8.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
vantadb_ollama-0.8.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
vantadb_ollama-0.8.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
vantadb_ollama-0.8.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_ollama-0.8.0-cp311-abi3-win_amd64.whl

Download URL vantadb_ollama-0.8.0-cp311-abi3-win_amd64.whl
Size 1.6 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6523066a20bc68262a64d3ffa601d5458ae2ad4d49bff0625b0354d279dae8ba
BLAKE2b-256 checksum
How to use checksums
c550109d36d547771ea30b36e0cd4456a928f0f3ea21cf3ba811f6f20635523b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_ollama-0.8.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL vantadb_ollama-0.8.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
b183680088341d877e24a6db2b8c39c053922a7d1a190144eaf2c6a14cd735b7
BLAKE2b-256 checksum
How to use checksums
fc0cd7188d5d513c2c90fe4c9c79ed423f1b31f4aa4045da7da5b2bd15cd251b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_ollama-0.8.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL vantadb_ollama-0.8.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
b0cbcabdb4962946e3cbd510c0932edb78e0443f0f2cf4f14603b3efc95ed5cb
BLAKE2b-256 checksum
How to use checksums
bc349bd9d9a5483c84be7800119178a0a63c04f0ccdb87811ed379890d9109e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_ollama-0.8.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL vantadb_ollama-0.8.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
49200ffd54a53742df8b816dedd8c8dab73138f5be5fda1c1dbecf27ddff9310
BLAKE2b-256 checksum
How to use checksums
228a2a8b90b235d095388260c3e4d8dc43995554f7ded87c4e9f4416aed893eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.8.0 This release

4 release files

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