Skip to main content

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

Metadata

Release files for embex 0.1.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for embex 0.1.21
File Size Uploaded
embex-0.1.21.tar.gz 126.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for embex 0.1.21
File
embex-0.1.21-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
embex-0.1.21-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
embex-0.1.21-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
embex-0.1.21-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 145.3 MB

Release files / embex-0.1.21.tar.gz

Download URL embex-0.1.21.tar.gz
Size 126.3 kB
Tags Source
SHA-256 checksum
How to use checksums
662ae6ce9a1a4282600873fb8ec4b86fb3a87b1e3ffd27baef0284f96f600d18
BLAKE2b-256 checksum
How to use checksums
ef5d88d2a9ff62f9cf914ed55bb2576e9f39065e78e2b00726d39b6237998184
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / embex-0.1.21-cp38-abi3-win_amd64.whl

Download URL embex-0.1.21-cp38-abi3-win_amd64.whl
Size 36.3 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4d749b5b0a4b1ae3d8255dd10ffa716dc9be8e5f43aa44020fb61896c7c2e418
BLAKE2b-256 checksum
How to use checksums
31132e0760977784fd8ef154c81da63401b16fa311845cd3f177dfccac2ddba7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / embex-0.1.21-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL embex-0.1.21-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 38.8 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b383a8403116dbb7b0469394f3191a5edac4be29073af3aeb493bb0b20e97cb2
BLAKE2b-256 checksum
How to use checksums
c92f24b4e51ac3d537c13a3f69b35a2d7cc8a02e3ed00c52798f33c7fcd5d266
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / embex-0.1.21-cp38-abi3-macosx_11_0_arm64.whl

Download URL embex-0.1.21-cp38-abi3-macosx_11_0_arm64.whl
Size 32.9 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9d44c2abc266e4280522fad1ea3ec073a07c6c6663ce3112a6c94e7b91287608
BLAKE2b-256 checksum
How to use checksums
766770aa86abeb1a4d2b7e59f72195b9b9c25ebf5401cc2a11ac383e33776769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / embex-0.1.21-cp38-abi3-macosx_10_12_x86_64.whl

Download URL embex-0.1.21-cp38-abi3-macosx_10_12_x86_64.whl
Size 37.1 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
39da95eae611df2fc0497a67384f445f3a46d3d9f039ceec5248c5a254506da9
BLAKE2b-256 checksum
How to use checksums
d7cc74644d637ae6b82cf0b3535e3bb489f3afc8039d965a49f1f4125cebbc57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.21 This release

5 release files

0.1.20

5 release files

0.1.19

5 release files

0.1.17

5 release files

0.1.12

5 release files

0.1.11

5 release files

0.1.10

5 release files

0.1.9

5 release files

0.1.8

5 release files

0.1.7

5 release files

0.1.6

1 release file

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page