Skip to main content

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.

PyPI Version Python Versions License

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vector_store_client-1.0.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vector_store_client-1.0.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file vector_store_client-1.0.0.tar.gz.

File metadata

  • Download URL: vector_store_client-1.0.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for vector_store_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f54bd96db46ad33423a3d7175c2305f6e7b9fec3b55b2f194f7e786de8640288
MD5 03e6e72ee2731d988bc33b65fd6dbc23
BLAKE2b-256 fd92c583b36040e95ab8d2a00d220f7d4d3103ed98ada0ce3bb0decc7ea35e5d

See more details on using hashes here.

File details

Details for the file vector_store_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vector_store_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80f669d844849bcb1ec1b3cadf4c7a38a275ecda5457ebc0100aa471c5598823
MD5 b68a3c4aba306582f51aa284fa3bdb95
BLAKE2b-256 348036b47bbf863f1d0cdd3f455b3df608f40e2e97edfc623ca018410a7ece53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page