Skip to main content

Embex: A Universal Vector Database ORM

Project description

Embex (Python)

The fastest way to add vector search to your app.

Embex is a universal vector database client that lets you start with zero setup and scale to production without rewriting code.

🚀 Features

  • Start Simple: Use LanceDB (embedded) for zero-setup local development.
  • Unified API: Switch to Qdrant, Pinecone, or Milvus just by changing the config.
  • Performance: Powered by a shared Rust core with SIMD acceleration.
  • Type Safety: Fully typed Python bindings.

📦 Installation

pip install embex lancedb sentence-transformers

⚡ Quick Start

Build semantic search in 5 minutes using LanceDB (embedded) and local embeddings. No API keys or Docker needed!

import asyncio
from embex import EmbexClient, Vector
from sentence_transformers import SentenceTransformer

async def main():
    # 1. Setup Embedding Model
    model = SentenceTransformer('all-MiniLM-L6-v2')

    # 2. Initialize Client (uses LanceDB embedded)
    client = await EmbexClient.new_async(provider="lancedb", url="./data")

    # 3. Create Collection (384 dimensions for MiniLM)
    await client.create_collection("products", dimension=384)

    # 4. Insert Data
    documents = [
        {"id": "1", "text": "Apple iPhone 15", "category": "electronics"},
        {"id": "2", "text": "Samsung Galaxy S24", "category": "electronics"},
    ]

    vectors = []
    for doc in documents:
        vectors.append(Vector(
            id=doc["id"],
            vector=model.encode(doc["text"]).tolist(),
            metadata={"text": doc["text"]}
        ))

    await client.insert("products", vectors)

    # 5. Search
    query = "smartphone"
    results = await client.search(
        collection_name="products",
        vector=model.encode(query).tolist(),
        limit=1
    )

    print(f"Query: '{query}'")
    print(f"Match: {results[0].metadata['text']}")

if __name__ == "__main__":
    asyncio.run(main())

🗺️ Development → Production Roadmap

Stage Recommendation Why?
Day 1: Learning LanceDB Embedded. Zero setup. Free.
Week 2: Staging Qdrant / Pinecone Managed cloud. Connection pooling.
Month 1: Scale Milvus Distributed. Billion-scale vectors.
Anytime PgVector You already use PostgreSQL.

☁️ Switch Provider (Zero Code Changes)

Ready for production? Just change the initialization line.

From LanceDB (Dev):

client = await EmbexClient.new_async(provider="lancedb", url="./data")

To Qdrant Cloud (Prod):

client = EmbexClient(
    provider="qdrant",
    url="https://your-cluster.qdrant.io",
    api_key="..."
)

🔄 Data Migration

Move data between providers effortlessly using the built-in DataMigrator.

from embex import DataMigrator, EmbexClient

# 1. Setup clients
source = await EmbexClient.new_async("lancedb", "./local_data")
dest = EmbexClient("qdrant", "http://prod-db:6333")

# 2. Migrate
migrator = DataMigrator(source, dest)
result = await migrator.migrate_simple(
    source_collection="products",
    dest_collection="products_v2"
)

print(f"Migrated {result.points_migrated} points!")

🔗 Resources

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

embex-0.1.17.tar.gz (120.1 kB view details)

Uploaded Source

Built Distributions

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

embex-0.1.17-cp38-abi3-win_amd64.whl (36.2 MB view details)

Uploaded CPython 3.8+Windows x86-64

embex-0.1.17-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

embex-0.1.17-cp38-abi3-macosx_11_0_arm64.whl (33.0 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

embex-0.1.17-cp38-abi3-macosx_10_12_x86_64.whl (37.1 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file embex-0.1.17.tar.gz.

File metadata

  • Download URL: embex-0.1.17.tar.gz
  • Upload date:
  • Size: 120.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for embex-0.1.17.tar.gz
Algorithm Hash digest
SHA256 36d43a92b07cc978d861f47e9bb1eef1665c971efd52ed170eda65b77cdd0c17
MD5 6ea9bf005ba3f2bf73937d72e564a10e
BLAKE2b-256 68e23d4710de812392eec2e5e90eb849252e2d5494d8054f73730e9a30aba99f

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.17.tar.gz:

Publisher: release-python.yml on bridgerust/bridgerust

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

File details

Details for the file embex-0.1.17-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: embex-0.1.17-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 36.2 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for embex-0.1.17-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 18d43315895117efb429a0a9c8a021ff9cf589ab8c130e2820d1949f0407fbbb
MD5 cd2f742b096f7b3c84da3cfb611229a8
BLAKE2b-256 511e4769b7de0988dd69c2313a295d65cf3cbc26c3b08d44d1f0a70ee6d98b94

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.17-cp38-abi3-win_amd64.whl:

Publisher: release-python.yml on bridgerust/bridgerust

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

File details

Details for the file embex-0.1.17-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for embex-0.1.17-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae5370e95d6446819eae2dbff0b0effef17b98a258d63604055e8f38732a1f53
MD5 1f986077d9349181e7955f83ec94a2ec
BLAKE2b-256 c9dac67af01dbd0ae38fb4697eff54c2ae4bf82f58743e857e1956a74b7ae2a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.17-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-python.yml on bridgerust/bridgerust

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

File details

Details for the file embex-0.1.17-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for embex-0.1.17-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db0c1a2c40ab9cf86d409d335b8f3cecf839f0530936c99473cf4e5704f3b515
MD5 06658fdcfc505c7af40b34dfb4bb4690
BLAKE2b-256 6a2c0becbb470b964a33a42d79b3b19cc238d2d3738b7bf755393d1998527967

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.17-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on bridgerust/bridgerust

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

File details

Details for the file embex-0.1.17-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for embex-0.1.17-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4819fff6aee80a2509e6f09e2aee39b1ebbec21563cd2b0b8a34ad8a7334ef08
MD5 b9822024cf7185fe82c8e27184b252b4
BLAKE2b-256 ea9f0bcb730816d45606158b74a6d68eb75f0a70c328716265235478a1be2ed1

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.17-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on bridgerust/bridgerust

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