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

Download URL vantadb_ollama-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
1c459ac4d2eca1c5e4b0587a79ca13091984c3158ac530726a86d91062521760
BLAKE2b-256 checksum
How to use checksums
8ffca7f1be6e7ac9a2898d20c9bf4303bf81b93fa1d06f441e19a5e2b625e053
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.9.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL vantadb_ollama-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
1fa618e2bb50b3365cb7a1d0969a2a69257cb9a4ad9802eff5ec400c0ccec925
BLAKE2b-256 checksum
How to use checksums
187a48484bf870bb7f5eab5afb7f51d4b08126f9d6abd3eada926b988c7a4f84
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.9.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL vantadb_ollama-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
20bc945683910a61bea9b754de3c84b039e4d5f5e578a658a6d10b298976cf59
BLAKE2b-256 checksum
How to use checksums
af5fb0bc695218ea575cbebc794b54b9a9664da8b22a9e92f89608b27b8ee1aa
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.9.0-cp311-abi3-macosx_11_0_arm64.whl

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

Security for vantadb-ollama 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