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.2.0.tar.gz
(12.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 vdb_python-0.2.0.tar.gz.
File metadata
- Download URL: vdb_python-0.2.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64a86cc8220696049c12dec3596a717148e66bf478ab01b50506d2663825a7c1
|
|
| MD5 |
e5c83227ba6c999e99d4ff3cd30e3a17
|
|
| BLAKE2b-256 |
6afac45b32e9fcefec79cd52d437bedee2540a5ec2c39acf524305acedcbec8b
|
File details
Details for the file vdb_python-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vdb_python-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.2 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 |
d6fd71899e0d7bdf382f2249f65b629f6436527c1799b64d6e85177e640e8675
|
|
| MD5 |
b4a018f9f1e65ca533740a1579948677
|
|
| BLAKE2b-256 |
f6d9567e5e46d865d7d7d1a1ad095b9a81f984264d0df1203e0788db4f5c8faa
|