VectorLiteDB
SQLite for Embeddings — A simple, embedded vector database that stores everything in a single file.
No server. No setup. Just vectors in a file.
Why?
Every vector database is either a cloud service (Pinecone), needs a server (Chroma), or doesn't persist (FAISS).
Sometimes you just want to store embeddings in a file and search them. Like SQLite does for relational data.
Quick Start
pip install vectorlitedb
from vectorlitedb import VectorLiteDB
# Create a database (just a file)
db = VectorLiteDB("my_vectors.db", dimension=384)
# Store vectors with metadata
db.insert(id="doc1", vector=embedding, metadata={"text": "Hello world"})
db.insert(id="doc2", vector=embedding2, metadata={"text": "Goodbye world"})
# Search (returns most similar vectors)
results = db.search(query=query_embedding, top_k=5)
# Results format
for result in results:
print(f"ID: {result['id']}")
print(f"Similarity: {result['similarity']}")
print(f"Metadata: {result['metadata']}")
Your vectors are saved in my_vectors.db.
What This Does
- Stores vectors (embeddings) with metadata in a single file
- Searches for similar vectors using cosine/L2/dot distance
- Persists everything to disk automatically
- Filters results by metadata
- Works offline - no internet required
What This Doesn't Do (Yet)
- ❌ Generate embeddings (use OpenAI, etc.)
- ❌ Scale beyond ~100K vectors (uses brute force search)
- ❌ Handle concurrent writes
- ❌ Optimize for speed
Use Cases
- Local RAG: Store document embeddings for offline search
- Personal AI: Give your assistant persistent memory
- Prototyping: Test vector search ideas without infrastructure
- Edge devices: Semantic search on Raspberry Pi
- Privacy: Keep embeddings on your device
API Reference
Create/Open Database
db = VectorLiteDB("path/to/file.db", dimension=384, distance_metric="cosine")
# distance_metric: "cosine" (default), "l2", or "dot"
Insert Vectors
db.insert(id="unique_id", vector=[0.1, 0.2, ...], metadata={"key": "value"})
Search Vectors
results = db.search(
query=[0.1, 0.2, ...],
top_k=5,
filter=lambda meta: meta.get("type") == "document" # optional
)
Get/Delete Vectors
vector, metadata = db.get("unique_id")
db.delete("unique_id")
Database Info
print(len(db)) # number of vectors
print(repr(db)) # database summary
Current Status
This is v0.1.0 - a working alpha focused on simplicity over performance.
What works:
- ✅ Basic CRUD operations
- ✅ File persistence
- ✅ Metadata filtering
- ✅ ~100ms search for 10K vectors
Planned:
- 🚧 Better search algorithms (IVF, HNSW)
- 🚧 Memory-mapped files for large datasets
- 🚧 Language bindings (JavaScript, Rust, Go)
Contributing
The codebase is intentionally small (~200 lines) and readable.
Perfect for:
- First-time contributors
- Algorithm implementations
- Performance optimizations
- Documentation improvements
See issues labeled good first issue.
Inspiration
- SQLite: Single-file, serverless, embedded
- FAISS: Fast similarity search
VectorLiteDB combines the best parts: embedded like SQLite, simple like a Python dict, persistent like a real database.
License
VectorLiteDB is licensed under the Apache 2.0 License.
Metadata
Release files for vectorlitedb 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vectorlitedb-0.1.0.tar.gz | 10.9 kB | Without provenance | Details for vectorlitedb-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vectorlitedb-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for vectorlitedb-0.1.0-py2.py3-none-any.whl |
Total release size: 21.3 kB
Release files / vectorlitedb-0.1.0.tar.gz
| Download URL | vectorlitedb-0.1.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f6b32dd14637f80894585a59b6176a64a5c19f46efe47e032c37c09ad7b5ec9
|
|
BLAKE2b-256 checksum How to use checksums |
aa477b0ad61ead9ef1be450961437cd4d5e8107106409ab8198524f509dfa37e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / vectorlitedb-0.1.0-py2.py3-none-any.whl
| Download URL | vectorlitedb-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
11f64fea3b28c114217032067afd015bb68981061632aabbdafbbee8905bbc45
|
|
BLAKE2b-256 checksum How to use checksums |
de700fbc90c7bc5ed2564e0242d1e1247b875530f6ce65b0b60c6c95e38f37b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for vectorlitedb 0.1.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.