Official Python SDK for VectorDBCloud API
Project description
VectorDBCloud Python SDK
Official Python SDK for VectorDBCloud API.
Installation
pip install vectordbcloud
Quick Start
from vectordbcloud import VectorDBCloud
# Initialize client
client = VectorDBCloud(
api_key="your-api-key",
base_url="https://api.vectordbcloud.com/prod" # Optional, defaults to production
)
# Check API health
health = client.health()
print(health)
# Generate embeddings
embedding = client.generate_embedding("Hello, world!")
print(embedding)
# Search vectors
results = client.search_vector(
vector=[0.1, 0.2, 0.3, 0.4, 0.5],
limit=10
)
print(results)
# Connect to vector databases
weaviate_config = {
"url": "http://localhost:8080",
"api_key": "your-weaviate-key"
}
connection = client.connect_weaviate(weaviate_config)
API Reference
Core Methods
health()- Check API healthversion()- Get API version
Authentication
login(email, password)- User loginlogout()- User logout
Vector Search
search_vector(vector, limit, filters)- Vector similarity searchsearch_semantic(text, limit, filters)- Semantic text search
AI Methods
generate_embedding(text)- Generate text embeddingsgenerate_text(prompt, **kwargs)- Generate text with AI
Billing
get_usage()- Get usage statisticsget_invoices()- Get billing invoices
Vector Database Connections
connect_weaviate(config)- Connect to Weaviateconnect_pinecone(config)- Connect to Pineconeconnect_chroma(config)- Connect to ChromaDBconnect_qdrant(config)- Connect to Qdrantconnect_milvus(config)- Connect to Milvus
Configuration
client = VectorDBCloud(
api_key="your-api-key",
base_url="https://api.vectordbcloud.com/prod",
timeout=30
)
Error Handling
from vectordbcloud import VectorDBCloud, AuthenticationError, APIError
try:
client = VectorDBCloud(api_key="invalid-key")
result = client.health()
except AuthenticationError:
print("Invalid API key")
except APIError as e:
print(f"API error: {e}")
Version
Current version: 1.1.0
License
MIT License
Support
- Documentation: https://docs.vectordbcloud.com
- GitHub: https://github.com/VectorDBCloud/python-sdk
- Issues: https://github.com/VectorDBCloud/python-sdk/issues
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
vectordbcloud-1.1.1.tar.gz
(5.1 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 vectordbcloud-1.1.1.tar.gz.
File metadata
- Download URL: vectordbcloud-1.1.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ccbd41e9d0b825eb477f085f51fcad1f9445b0ebb81198709cc15b4c0923a51
|
|
| MD5 |
d2ecee809e94d51144d20e2ed10d7248
|
|
| BLAKE2b-256 |
fac044f9b42cf4ab447e0a9d46cd661de91e47ebcfe794d855cab19edb4ccdf9
|
File details
Details for the file vectordbcloud-1.1.1-py3-none-any.whl.
File metadata
- Download URL: vectordbcloud-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83bfca838528d93b683b954b96e27f18d646d16051e238c1db980f037db738e7
|
|
| MD5 |
64836aa7d32969197925dbe67d0554c7
|
|
| BLAKE2b-256 |
5b7ef7dd7b791f1ade5c8de446d2e54a2113ae24b4ed859103acea71927290cc
|