Client library for Vector Store service
Project description
Vector Store Client
A Python client for interacting with Vector Store API services. This client provides a convenient interface for working with vector embeddings, semantic search, and metadata filtering.
Features
- Full-featured API for Vector Store operations
- Asynchronous interface based on
httpx - Automatic parameter handling and validation
- Comprehensive error management
- Support for all vector store operations:
- Creating records from text or vectors
- Vector similarity search
- Metadata filtering
- Record management
Installation
pip install vector-store-client
Or install from source:
git clone https://github.com/yourusername/vector-store-client.git
cd vector-store-client
pip install -e .
Quick Start
import asyncio
from vector_store_client import create_client
async def main():
# Create client with connection to the service
client = await create_client(base_url="http://localhost:8007")
# Create a record from text
record_id = await client.create_text_record(
text="Example text for vectorization",
metadata={"type": "example", "tags": ["test", "vector"]}
)
# Search for similar records
results = await client.search_text_records(
text="vectorization example",
limit=5
)
for result in results:
print(f"ID: {result.id}, Similarity: {result.score:.4f}")
# Close the client session
await client._client.aclose()
if __name__ == "__main__":
asyncio.run(main())
Documentation
Detailed documentation is available in both English and Russian:
Examples
Check out the example scripts to get started:
- Basic Usage - Essential operations
- Advanced Usage - Complex scenarios and filtering
Development
Requirements
- Python 3.7+
- httpx
- pydantic
Running Tests
# Install test dependencies
pip install pytest pytest-asyncio pytest-cov
# Run tests
python run_tests.py
License
MIT
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
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 vector_store_client-1.1.1.tar.gz.
File metadata
- Download URL: vector_store_client-1.1.1.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ae96be48504db814b010f2129075c2bbee885e937ee312f0a4b121ddae1de2a
|
|
| MD5 |
781a229bfd4219dc11f7fb09213eea7f
|
|
| BLAKE2b-256 |
a6e7204e6c245a6aee66666a0e1142c75351d39a45b12a6e7295c3810b781656
|
File details
Details for the file vector_store_client-1.1.1-py3-none-any.whl.
File metadata
- Download URL: vector_store_client-1.1.1-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd5890e3769668265f05981b44e7cfe08d48d53c621e67530055a484ab58be9b
|
|
| MD5 |
10549c10887fc69de6cbc06d37cff3e8
|
|
| BLAKE2b-256 |
5f811be3f42730f5d4ca68f782ad97c76285014dc570f9824214ef57613feda6
|