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.1.0.tar.gz (21.4 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.1.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vector_store_client-1.1.0.tar.gz
  • Upload date:
  • Size: 21.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 470179f159165f05e569d5a1c9713447907118c6aa5eff95112e7c8c34edbe0f
MD5 3a609bb228144cc44f2b043333043545
BLAKE2b-256 f2ccf9c1900847bb2bff9ca24331c300de493ce5255a98d921d7e4a2fd757921

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_store_client-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8d92e3464723393204cc9681c98e2c8471841417465aed5022ce3ab60276075
MD5 b492da988197d72b89cf497c1f4a2846
BLAKE2b-256 3cbd96741248b5d6271a0d06e86af96674082e4227456ad6b6e5ac5d564712a4

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