PitchHut logo
CyborgDB Python SDK
A secure Python client for the first Confidential Vector Database.
Pitch

CyborgDB Python SDK offers a powerful library for securely interacting with the Confidential Vector Database. It allows for encrypted vector operations while preserving the confidentiality of embeddings. Designed for modern Python applications, this SDK integrates easily and supports a variety of indexing methods, making it ideal for high-performance AI workloads.

Description

The CyborgDB Python SDK serves as a robust client library for seamless interaction with CyborgDB, the pioneering Confidential Vector Database. This powerful SDK is designed for encrypted vector operations including ingestion, search, and retrieval, ensuring end-to-end encryption of vector embeddings. Ideal for Python applications, it translates into easy integration within modern Python services and workflows.

Key Features

  • End-to-End Encryption: Upholds encryption with client-side keys for all vector operations.
  • Zero-Trust Design: Innovative architecture to safeguard confidential inference data.
  • High Performance: Leverages GPU-accelerated indexing and retrieval with CUDA support.
  • Familiar API: Facilitates straightforward integration with existing AI workflows.
  • Flexible Indexing: Supports various index types (IVFFlat, IVFPQ, etc.) with customizable parameters for tailored configurations.

Getting Started

For a quick and efficient start, refer to the Quickstart Guide.

Example Usage

Here's a brief example demonstrating how to initialize the client and perform basic operations:

from cyborgdb import Client

# Initialize the client
client = Client('https://localhost:8000', 'your-api-key')

# Generate a 32-byte encryption key
index_key = client.generate_key()

# Create an encrypted index
index = client.create_index(
    index_name='my-index', 
    index_key=index_key
)

# Add encrypted vector items
items = [
    {
        'id': 'doc1',
        'vector': [0.1] * 128,  # Replace with real embeddings
        'contents': 'Hello world!',
        'metadata': {'category': 'greeting', 'language': 'en'}
    },
    {
        'id': 'doc2',
        'vector': [0.1] * 128,  # Replace with real embeddings
        'contents': 'Bonjour le monde!',
        'metadata': {'category': 'greeting', 'language': 'fr'}
    }
]

index.upsert(items)

# Query the encrypted index
query_vector = [0.2] * 128  # 128 dimensions
results = index.query(query_vectors=query_vector, top_k=5)

# Print the results
for result in results:
    print(f"ID: {result['id']}, Distance: {result['distance']}")

For more detailed information on advanced usage scenarios, including batch queries and metadata filtering, please refer to the complete documentation available at Cyborg Docs. With the CyborgDB Python SDK, harness the power of encrypted vector databases while ensuring data security and performance.

0 comments

No comments yet.

Sign in to be the first to comment.