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

Пример использования

# ...
record = await client.create_record(vector=vector, metadata=metadata)
print("Record ID:", record["record_id"])

text_record = await client.create_text_record(text="Some text", metadata=metadata)
print("Text Record ID:", text_record["record_id"])
# ... existing code ...

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.2.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.1.2-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vector_store_client-1.1.2.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.1.2.tar.gz
Algorithm Hash digest
SHA256 fee456fc75207e8c337fe4561dd7540dec3827dc9af6158ae9a744b89599a948
MD5 9087e46260ca6bcedb3a45808230a39e
BLAKE2b-256 0e47dc56578978d7174449441a242c1aa322fe718778e6d1a92c17141c2e01f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_store_client-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f6dee9bc2d0144ab041dcd27173b11e5d9d3578046cfe73c8b6e9ea68de0cd6
MD5 34ea1b98ed366a82a371eb9be1da6fef
BLAKE2b-256 4308e58766ed029f3ba6a46a1c9aecf2822d3f4e1a91d96cae761496ac716f99

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