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.1-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.1-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.1-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.1-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.1-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.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 91a017ca5fe239adc52066a2d92622dd1c5a20eb20e3432808b2a843f1a4fca0
MD5 29f338b4a571b74d5fc4eceb1355d9d8
BLAKE2b-256 a1a0d72519e49db557aaed917f02e40c4aedb397818923884dcf5d642fd5462f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.1-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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb624baaf1dd0526b226e84fb12e35c2fbff502ffcabf189c4e71c344b41b6c4
MD5 f076a670eb9d7e3c1b485e9958bfe68a
BLAKE2b-256 89131737e3a317fda4be4c1de511b83f17566dd7b1ffeb8dd4cad38e4621546c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.1-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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3d81b2d699682b0daa6b2ec199c4f0298f29c1edff183161e08b1cc25fa301cd
MD5 59f5f857c44e2640281849cb19bea50a
BLAKE2b-256 709c0cd5b67af0e0b88ab72ff8f9aeb09043bb893cef0fb77d8f938b4aedeebb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e79401f9013282815b1868a72f6ca04bf562c307cd1cac25ea546ccb3d28af6
MD5 65fc577b755d989d0c0b7930bce7d57a
BLAKE2b-256 92ef5e5d01ce9bf33b07148365dab6c9def0a29db4b822bb8d6d62ddad1a85dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.1-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.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyborgdb_core_cu12-0.16.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9ff7fa4fa24fffb0af1f3472d29519f6798b00f94b223fdbeedbe43106a06635
MD5 2eddf8126fd04d1c6b65745364542af6
BLAKE2b-256 54eb07c0006e54fc1aba674b6c4be90c0f4e0141877297b85219921de250c6aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyborgdb_core_cu12-0.16.1-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