Skip to main content

MoteDB Python Bindings

Embedded multimodal database for Python — SQL + vector search + full-text search + spatial in one engine, with edge-presets for memory-constrained devices.

Install (from source)

pip install maturin
cd bindings/python
maturin develop --release
# no maturin / offline? scripts/build_wheel.sh builds a wheel with cargo+zip

Quick start

import motedb

db = motedb.Database("/data/store.mote", preset="edge")   # general|edge|robotics|embodied
db.execute("CREATE TABLE IF NOT EXISTS docs (id INT PRIMARY KEY AUTO_INCREMENT, text TEXT, emb VECTOR(384))")
db.execute("INSERT INTO docs (text, emb) VALUES (?, ?)", params=["hello world", [0.1] * 384])

rows = db.execute("SELECT id, text FROM docs WHERE text MATCH AGAINST('hello')")   # list[dict]
cols, tuples = db.query("SELECT id, text FROM docs")                               # (columns, list[tuple])

# Vector ANN — literal or parameter vectors both order correctly:
near = db.execute("SELECT id FROM docs ORDER BY emb <-> ? LIMIT 5", params=[[0.1] * 384])

tx = db.begin()
db.execute("UPDATE docs SET text = ? WHERE id = 1", params=["hi"])
db.rollback(tx)          # or db.commit(tx)

db.checkpoint()          # durability point
db.close()

API

Method Notes
Database(path, preset=None, create=True) create-or-open
execute(sql, params=None) SELECT → list[dict]; DML → affected count; DDL → None
query(sql, params=None) SELECT → (columns, list[tuple])
executemany(sql, params) one INSERT per parameter set — single WAL fsync per batch
begin()/commit(tx)/rollback(tx) transactions
doctor() self-check → {"verdict", "checks": [{name,status,detail}]}
checkpoint()/vacuum()/close() lifecycle

Parameter types: None/bool/int/float/str/list[float] (→ embedding vector), and geometry dicts for GEOMETRY columns: {"type": "Point3D", "x": 1.0, "y": -2.0, "z": 0.5}, {"type": "Point", "x": 1.0, "y": -2.0}, {"type": "LineString"|"Polygon", "points": [[x, y], ...]}. Result types: None/bool/int/float/str/list[float] (vector), timestamp as int microseconds, geometry as the same dict shapes (tensor still renders as a <tensor> tag).

Benchmark

bench/bench_edge.py — reproducible edge-workload comparison vs stdlib SQLite (see bench/README.md for methodology and reference numbers: point 2.9×, filter 3.7×, GROUP BY 9.8×, ANN 3.2×, RSS −12%; honest loss on batch insert).

Publishing

Wheels for 4 targets are built by .github/workflows/python-wheels.yml on tag push; PyPI publishing uses Trusted Publisher (register the repo at pypi.org → no token secret needed).

Known gaps (pre-1.0)

  • Tensor/Spatial/TextDoc values pass through as tags, not Python objects.

Metadata

Release files for motedb-python 0.14.0

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

Source distribution (sdist)

Source distribution for motedb-python 0.14.0
File Size Uploaded
motedb_python-0.14.0.tar.gz 2.1 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for motedb-python 0.14.0
File
motedb_python-0.14.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
motedb_python-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
motedb_python-0.14.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
motedb_python-0.14.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
motedb_python-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 22.2 MB

Release files / motedb_python-0.14.0.tar.gz

Download URL motedb_python-0.14.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
c04a93cbaadeefea40a8c994b001c999a1371db76c83b087ffa6801241bf1582
BLAKE2b-256 checksum
How to use checksums
e4942c4988e4cc6574e37b685529c5f332d8d64479b1524bd0ac18185ec78655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / motedb_python-0.14.0-cp39-abi3-win_amd64.whl

Download URL motedb_python-0.14.0-cp39-abi3-win_amd64.whl
Size 3.7 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e81e59b624f35392c905e8aec23fe94647f38c7222782a9e774408df9cf44463
BLAKE2b-256 checksum
How to use checksums
9c648198b8e4a4a4d665bf8c7c561400df7d3655b1cf655f28e1d07f8d088ec7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / motedb_python-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL motedb_python-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.3 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
16a432ea40172aa644c4fd80f61c3a5c6396b8b136bdcd9aa3d67dcac282d0eb
BLAKE2b-256 checksum
How to use checksums
b17d7fefbd837a7828009c6e9d3ff0a8c1ff057528f8144811ee93c1d8352589
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / motedb_python-0.14.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL motedb_python-0.14.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.1 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
871f7e687071f7b6f50b542a3e31b97a3c757e823c25c49315520f3dd8e6d19a
BLAKE2b-256 checksum
How to use checksums
b8c462e1d8162e612419e43d447190194ed9a581ebeaee09da75b834c4c81ce9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / motedb_python-0.14.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL motedb_python-0.14.0-cp39-abi3-macosx_11_0_arm64.whl
Size 3.9 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f7ee58855c229678feea82762aa38d212a8f0d1ae82f93e59bb1dd8bd3f6660e
BLAKE2b-256 checksum
How to use checksums
1d406a27e8d61235b299a417b164270d0d0ced9b103dcf6e88ccb9c73a26adfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / motedb_python-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL motedb_python-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 4.1 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5d4b2c18fa8fc99f050b235a3a61351c1206dacdd63cd4ecd36492c6eaa56b02
BLAKE2b-256 checksum
How to use checksums
400144e6a4913acd640be2388c9cd97178ca670e3d3dd5853bdf3b957100e418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.14.0 This release

6 release files

0.13.0

6 release files

0.12.9

6 release files

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