Skip to main content

Core Python Library for CyborgDB: The Confidential Vector Database (CUDA 12)

Project description

CyborgDB Core

PyPI - Version PyPI - Python Version

CyborgDB is the first Confidential Vector Database that enables you to ingest & search vectors embeddings in a privacy-preserving manner, without revealing the contents of the vectors themselves. It works with existing DBs (e.g., Postgres, Redis) and enables you to add, query and retrieve vector embeddings with transparent end-to-end encryption.

Why Confidential?

Vector Search is at the heart of popular AI applications like RAG, recommendation systems, and semantic search. CyborgDB leverages cryptographic hashing and symmetric encryption to enable Approximate Nearest-Neighbor (ANN) search over encrypted space, keeping your vector embeddings secure throughout their lifecycle.

Key Features

  • End-to-End Encryption: Vector embeddings remain encrypted throughout their lifecycle, including at search time
  • Zero-Trust Design: Novel architecture keeps confidential inference data secure
  • High Performance: GPU-accelerated indexing and retrieval with CUDA support
  • Familiar API: Easy integration with existing AI workflows
  • Multiple Backing Stores: Works with PostgreSQL, Redis, S3, and in-memory storage
  • Cloud Ready: Supports AWS RDS, AWS ElastiCache, Azure Database for PostgreSQL, Azure Cache for Redis, Google Cloud SQL, and Google Cloud Memorystore

Getting an API Key

To start using cyborgdb-core, you will need to get an API key from db.cyborg.co. You can sign up for a free account, create an API key and use it immediately.

Installation

# Install CyborgDB Core (CPU):
pip install cyborgdb-core

# Install CyborgDB Core (CUDA):
pip install cyborgdb-core-cu12

Quickstart

import cyborgdb_core as cyborgdb
import secrets

# Set your CyborgDB API key
api_key = 'cyborgdb_000000' # Replace with your actual API key

# Create a client with memory storage
# You can replace this with Postgres
index_location = cyborgdb.DBConfig("memory", "index")  # For index contents
config_location = cyborgdb.DBConfig("memory", "config") # For config/loading
items_location = cyborgdb.DBConfig("memory", "items")  # For item contents

# Create a client
client = cyborgdb.Client(api_key, index_location, config_location, items_location)

# Generate an encryption key for the index
index_key = secrets.token_bytes(32)

# Create an encrypted index
index = client.create_index("my_index", index_key)

# Add items to the encrypted index
items = [
    {"id": "item_1", "vector": [0.1, 0.2, 0.3, 0.4], "contents": "Hello!"},
    {"id": "item_2", "vector": [0.5, 0.6, 0.7, 0.8], "contents": "Bonjour!"},
    {"id": "item_3", "vector": [0.9, 0.10, 0.11, 0.12], "contents": "Hola!"}
]

index.upsert(items)

# Query the encrypted index
query_vector = [0.1, 0.2, 0.3, 0.4]
results = index.query(query_vector)

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

Connecting to Different Backing Stores

PostgreSQL

index_location = cyborgdb.DBConfig(
    location="postgres",
    table_name="index_table", 
    connection_string="host=localhost dbname=cyborgdb user=postgres password=postgres"
)

Redis

index_location = cyborgdb.DBConfig(
    location="redis",
    connection_string="redis://localhost"
)

Documentation

For more detailed documentation, visit:

System Requirements

  • Python 3.10 - 3.14
  • Operating Systems: Linux, macOS, or WSL

License

CyborgDB is provided under a commercial license with a perpetual free tier. Contact Cyborg or visit the pricing page for more information.

About Cyborg

Cyborg is dedicated to making AI safe and secure. We develop solutions that enable organizations to leverage AI while maintaining the confidentiality and privacy of their data.

Visit our website | Contact Us

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

cyborgdb_core_cu12-0.16.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (98.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyborgdb_core_cu12-0.16.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (98.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyborgdb_core_cu12-0.16.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (98.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyborgdb_core_cu12-0.16.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (98.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyborgdb_core_cu12-0.16.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (98.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file cyborgdb_core_cu12-0.16.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6bb610c7cf3ec27bb0597b08d11e8f2018bd53ddca46b830642f006d46c70d17
MD5 7f213223245efec66df9bb435d18e358
BLAKE2b-256 a027c385b6d65170dd94225cd27708a078e934f98373a7ad436e28e64e7d5527

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_py_cuda.yaml on cyborginc/cyborgdb-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cyborgdb_core_cu12-0.16.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 25c6f3e398140a61853a0ef9fd12c952fd0f45f74e0cca695da6ed0d44fd1468
MD5 8146594f85405e291a1d43334845bde6
BLAKE2b-256 d84ae6d2838ced0140574192fff21b2c2f2894a3deec2ca3221f47ffdb36c7ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_py_cuda.yaml on cyborginc/cyborgdb-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cyborgdb_core_cu12-0.16.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9df1ac7fdbe156e26b135a231464495b55930e7582715b3d7379d7c8c684e47
MD5 fd2c28af4d6779aae6b04bf50bfc19f3
BLAKE2b-256 5cb9a1db0f303d2e9222e608ad4c5b888cc73ba33691c61f345b85fb04e438d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_py_cuda.yaml on cyborginc/cyborgdb-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cyborgdb_core_cu12-0.16.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 879bd06d61c9c4107880f30eae06ee5921d222e40a513da6b86e3c0ccf2ebd2b
MD5 95c07e88bf86ae1a3c6ee463e9febf44
BLAKE2b-256 2750842bedac8fbdbba10ee6089ed758d79cf1463a0bb1b9814d1f1d7330f8d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_py_cuda.yaml on cyborginc/cyborgdb-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cyborgdb_core_cu12-0.16.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1050d72dad6ba65e96e623230efd5e7675784c8a05956bf9890d48123e1e7965
MD5 83588d446e2f39c1407a37133dfc40df
BLAKE2b-256 c29407da11f3c41b8dc6525b77ee04850f483a2cbe6ba020dec0f97714b99ba0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_py_cuda.yaml on cyborginc/cyborgdb-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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