EmbedDB Python SDK
Python bindings for EmbedDB — the embedded vector database.
Installation
pip install embeddb
Quick Start
import embeddb
# Open or create a database
db = embeddb.Database("data.embeddb")
# Create a collection
col = db.create_collection("docs", dimension=384, distance=embeddb.DistanceMetric.COSINE)
# Insert vectors
col.insert({"id": "doc1", "vector": [0.1] * 384, "metadata": {"title": "Hello"}})
col.insert({"id": "doc2", "vector": [0.2] * 384, "metadata": {"title": "World"}})
# Search
results = col.search(vector=[0.15] * 384, top_k=10)
for hit in results:
print(f"{hit.id}: {hit.score:.4f}")
API
Database
Database(path)— Open or create a databasedb.create_collection(name, dimension, distance)— Create a collectiondb.get_collection(name)— Get an existing collectiondb.close()— Close the database
Collection
col.insert(doc)— Insert a document{"id": str, "vector": [float], "metadata": dict}col.search(vector, top_k=10)— Search for nearest neighbors
Distance Metrics
DistanceMetric.COSINE— Cosine distanceDistanceMetric.EUCLIDEAN— Euclidean (L2) distanceDistanceMetric.DOT_PRODUCT— Dot product similarity
Metadata
Release files for vexra 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vexra-1.3.0.tar.gz | 49.9 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vexra-1.3.0-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| vexra-1.3.0-cp311-cp311-manylinux_2_34_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.34+ x86-64 | Details |
| vexra-1.3.0-cp311-cp311-macosx_11_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 11.0+ ARM64 | Details |
Total release size: 993.8 kB
Release files / vexra-1.3.0.tar.gz
| Download URL | vexra-1.3.0.tar.gz |
|---|---|
| Size | 49.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0405bc7aabfa0493aebad3767281c1b15d593cf71db18cc0c35980a9f18dbd7
|
|
BLAKE2b-256 checksum How to use checksums |
8f969a7dfe69f918ea1ecd147558f6e0f0a5e5600ead8d6de41868201eb37f19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / vexra-1.3.0-cp311-cp311-win_amd64.whl
| Download URL | vexra-1.3.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 273.0 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
793bd0d625d07151420a35fbfea11e9b9aff70084e5caffaf8dd4de60a4e7820
|
|
BLAKE2b-256 checksum How to use checksums |
9a69fccff3501807f5422c69a8c911de472c285c018ab93a42e941fffe7aa3ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / vexra-1.3.0-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | vexra-1.3.0-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 349.1 kB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
bd0fc297d3aa71c096e6e4dbb3d7ef7f6fe6441959aaa548e5acd0ab6a92363f
|
|
BLAKE2b-256 checksum How to use checksums |
437b2f167f6fd427cbd2ead4a2c84fd67c78e3e1764c236bfab8b78e59b76a0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / vexra-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | vexra-1.3.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 321.8 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c0e53dd24c62d33e4d9ccdecf97a6e7ddb0b8c2984f3ad6b2a708731789de93b
|
|
BLAKE2b-256 checksum How to use checksums |
cec408343ccb99d53a7ce4ee4d31c39c2dda585cf5168646bdb2f454cf61760f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|