OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Nano Vectordb

Nano Vectordb is a small, MIT-licensed Python vector database library that stores NumPy embedding vectors with associated fields in a local JSON-backed index. It supports upserts, nearest-vector queries with result limits and metadata filters, record lookup and deletion, and basic management of separate tenant databases.

Independent OpenViST project profile, based on linked sources.

Nano Vectordb — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Python application needs a small, file-backed vector index and can supply its own embeddings. The documented tenant helper is relevant when a prototype needs separate vector databases managed in one process.

Who it is for

  • Python developers building retrieval-augmented generation prototypes.
  • Teams adding local embedding search and metadata filtering to an application.
  • Developers who need simple separation between multiple vector stores.

Documented uses

  • Store and update embedding vectors alongside application fields.
  • Find nearest vectors and optionally restrict query results with a metadata condition.
  • Save an index to a local file and reload it later.
  • Create and manage separate tenant vector databases.
Before you choose

Requirements & limits

The project is published as a Python library and documents installation from PyPI or source. Its repository identifies the license as MIT.

  • The documented runtime requirement is Python 3.9.11 or later, with NumPy as the stated dependency.
  • Vectors are stored in a JSON file; the project's example for 100,000 vectors at dimension 1,024 reports an index of roughly 520 MB.
  • The library stores and searches supplied embeddings; it does not document embedding generation.
  • The multi-tenant helper provides basic tenant database management and a configurable in-memory capacity.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Create, populate and query a local vector index

Store embedding records in a JSON-backed index and retrieve nearest matches, optionally filtered by a field.

Before you start

  • Python 3.9.11 or later
  • NumPy
  • nano-vectordb installed from PyPI or source
  • Embedding vectors as NumPy arrays with a consistent dimension

Steps

  1. Install the package with the command below.

    Documented command
    pip install nano-vectordb
  2. Import NanoVectorDB and NumPy, then initialize the database with the embedding dimension and a storage-file path.

  3. Pass records containing a __vector__ NumPy array and any metadata fields to upsert; __id__ may be supplied, otherwise an ID is generated.

  4. Call query with an embedding; use top_k or a filter_lambda to limit results or apply a metadata condition.

  5. Call save() to create or overwrite the JSON index file; initializing from that file loads the index.

Expected outcome

A local, file-persisted vector index that can return nearest-vector matches and support metadata-filtered queries.

Guide limitations

  • The library expects the application to provide embeddings; embedding generation is not part of this documented workflow.
  • The README's example benchmark reports a roughly 520 MB JSON index for 100,000 vectors at dimension 1,024, so file size can be substantial.
Source-based practical guide

Manage separate tenant vector databases

Create and access separate vector databases through the documented multi-tenant helper.

Before you start

  • Python 3.9.11 or later
  • NumPy
  • nano-vectordb installed
  • The vector dimension for the tenant databases

Steps

  1. Import MultiTenantNanoVDB and initialize it with the vector dimension.

  2. Call create_tenant() and use get_tenant(tenant_id) to obtain that tenant's NanoVectorDB.

  3. Use the returned database for supported operations such as upsert and query.

  4. Call save() on the multi-tenant manager to save it; use its tenant-management methods to check or delete a tenant.

Expected outcome

A manager for separate tenant vector databases, with a configurable limit on the number kept in memory.

Guide limitations

  • The README describes this as naive multi-tenancy; it does not document a hosted service or broader tenant security controls.
  • The max_capacity setting limits tenant databases held in memory.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
gusye1234/nano-vectordb · Official homepage title · retained in its source language