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.19.tar.gz (122.7 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.19-cp38-abi3-win_amd64.whl (36.3 MB view details)

Uploaded CPython 3.8+Windows x86-64

embex-0.1.19-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.8 MB view details)

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

embex-0.1.19-cp38-abi3-macosx_11_0_arm64.whl (32.9 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

embex-0.1.19-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.19.tar.gz.

File metadata

  • Download URL: embex-0.1.19.tar.gz
  • Upload date:
  • Size: 122.7 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.19.tar.gz
Algorithm Hash digest
SHA256 b3ebb0a8ba31ae2886b8c8e57328412a180a4c81cdeb165e2d5bf661dd7c5150
MD5 b046f1b27cf357c54947d3172920f51a
BLAKE2b-256 7565223b55063b7735327e4a44d7bb8c07de3b47aba3c11e5d80c152b27e26a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.19.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.19-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: embex-0.1.19-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 36.3 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.19-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 af5051d88e96363ae5f839a34ff41fb1432f8779aa9d71b420e07d61dbc4c941
MD5 2d9f5997ee2ae27da94c44ff3f38577a
BLAKE2b-256 bf3a8ca6bacb87af441f556b47b6804d11984aae8940d7cafe5c13488807ca15

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.19-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.19-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for embex-0.1.19-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4256d137cee632d5a6308f098f83956fea66d60fb2a287c090153c610fb8daff
MD5 56987b29d2fb8f843b4059fee55a217d
BLAKE2b-256 3618d59002417f0c78d387c4ab35df8e99ba1ab4811aee098d8c50b1c0de2778

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.19-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.19-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for embex-0.1.19-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 915caf9d751c589a1084f15e1ad81405028b6248ca7562a976744ea5a210a29d
MD5 82051eb70581495e58ed2ef445e8bd07
BLAKE2b-256 88dfb726b41b33c92c021d4841e8282a6ba6a0b766b74237bb2241fb726cb404

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.19-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.19-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for embex-0.1.19-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 240fe02141ba8abdb7cad85f1e2d69323940274065d45d95778e0ba098db03a1
MD5 58eeeb8e58b7247381d2a50a0835072d
BLAKE2b-256 65da9d012fe27129ca8c47c0822d44a0ada22bef4c29500bc1712215aa678fb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for embex-0.1.19-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