Python SDK for the VectorDB REST API
Project description
vectordb-client
Python SDK for the VectorDB REST API — sync and async clients, CLI tool included.
Installation
pip install vdb-python
Quick Start
from vectordb_client import VectorDBClient
client = VectorDBClient(base_url="http://localhost:8000", api_key="your-key")
# Create a collection
client.collections.create("articles", dim=384, distance_metric="cosine")
# Upsert a vector
client.vectors.upsert("articles", external_id="doc-1", vector=[0.1, 0.2, ...], metadata={"title": "Hello"})
# Search
results = client.search.search("articles", vector=[0.1, 0.2, ...], k=5)
for r in results:
print(r.external_id, r.score)
Async Client
from vectordb_client import AsyncVectorDBClient
async with AsyncVectorDBClient(base_url="http://localhost:8000", api_key="your-key") as client:
await client.collections.create("articles", dim=384)
results = await client.search.search("articles", vector=query, k=5)
CLI
export VECTORDB_API_KEY=your-key
vdb collections list
vdb search articles '[0.1, 0.2, 0.3]' --k 5
vdb -o json collections get articles
Documentation
Full docs at lachu97.github.io/vector-db
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vdb_python-0.6.0.tar.gz
(16.0 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 vdb_python-0.6.0.tar.gz.
File metadata
- Download URL: vdb_python-0.6.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35f4924143e97ce4d092ce23f217672d7a3df7eaf219d3ba870c7b50d96e4abe
|
|
| MD5 |
7539e4706a66211b915019d966a1f378
|
|
| BLAKE2b-256 |
73e2498afd7f351ad96a91a433acade344b06cd5d82a71530f4cc17de12d179d
|
File details
Details for the file vdb_python-0.6.0-py3-none-any.whl.
File metadata
- Download URL: vdb_python-0.6.0-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ce0670080fb8aafb88dc99a2d35e8b3895f93d5868e686a9b44f78a46e47aec
|
|
| MD5 |
5d3f76004cf51969521d57b1aa2ef25e
|
|
| BLAKE2b-256 |
da057b0d8ab8b508d5afda84144ba979b3f0838961218d8791a4c5f10109eba8
|