Lightweight vector database.
Project description
VectorLiteDB
VectorLite is a simple vector database powered by sentence-transformers and hnswlib, designed for efficient storage and search of textual data.
🚀 Quick Install
pip install vectorlite
Usage
Run as api server
-
serve vectorlite -
Navigate to http://localhost:4440/docs
Run integrated in code
Initialization
from vectorlite import VectorLite
vl = VectorLite()
Adding Data
data = ["Sample text 1", "Sample text 2", "Another example"]
vl.create(data)
Read All Data
all_data = vl.read_all()
To limit the number of records returned:
limited_data = vl.read_all(max_items=2)
Read Specific Data by Index
item = vl.read(1)
Update Data by Index
vl.update(1, "Updated sample text 2")
Delete Data by Index
vl.delete(1)
Similarity Search
results = vl.similarity_search("A related sample text", k=3)
Semantic Search
results = vl.semantic_search("A related sample text", k=3)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vectorlite-0.4.0.tar.gz
(8.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vectorlite-0.4.0.tar.gz.
File metadata
- Download URL: vectorlite-0.4.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4388a645f25aa6bb5f7a8d85405c1b02ecf5eee1690810eba61340c93b41513
|
|
| MD5 |
71070804a5027bb2fb1e01f78e05c73e
|
|
| BLAKE2b-256 |
5cc1b70b8279d6ff6df8a48fcd4c019a93f35906417a40312de23cb42c895076
|
File details
Details for the file vectorlite-0.4.0-py3-none-any.whl.
File metadata
- Download URL: vectorlite-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f2efde1050eeb519c2b634ae893ba19e15548597ecc02cd844134eed716cfc6
|
|
| MD5 |
be67cc32f6a198e6c280ffaf668a78d5
|
|
| BLAKE2b-256 |
25a150edd551d226d398bd9ed0426be64bd6c9ddbf5f2345529deded73a378f6
|