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.12.7

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.12.7
File Size Uploaded
motedb_python-0.12.7.tar.gz 2.0 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for motedb-python 0.12.7
File
motedb_python-0.12.7-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
motedb_python-0.12.7-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.12.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
motedb_python-0.12.7-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
motedb_python-0.12.7-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 21.3 MB

Release files / motedb_python-0.12.7.tar.gz

Download URL motedb_python-0.12.7.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
2158e11e061e2c0d38bb8d5f5cdf4367f144845f7681a00272a72a1f3303f690
BLAKE2b-256 checksum
How to use checksums
257e879301dad668ddaf6db769c5089e1775ebe0a5c18f69aa211e336074cf8a
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 9, 2026.

Transparency log

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

Download URL motedb_python-0.12.7-cp39-abi3-win_amd64.whl
Size 3.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a3a71243190d10599ee2c303d09aef08b3fbdcb7c06267c01073668652de1c55
BLAKE2b-256 checksum
How to use checksums
a7417690419a16ec040ca31e20c6458768957fdd4b39c60edf4f41254aafaf74
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 9, 2026.

Transparency log

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

Download URL motedb_python-0.12.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
0c0988e6564dfbce87b4fc3ae05cbdb7d1a4800b3a08f79248cb54f176a00f1b
BLAKE2b-256 checksum
How to use checksums
d017fcc4bef29a2cf2fc5bb5521b68147c1ae34d475e6f39453110c2fe8ff183
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 9, 2026.

Transparency log

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

Download URL motedb_python-0.12.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.9 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6fd82a7beafc60330c713f2d4bf467d8dcea6fa07ebedb03f3cd4c0c35e6e44c
BLAKE2b-256 checksum
How to use checksums
8464b93a7f2b3e3fe021b3d6f9df4a6978277fd423ed988bba89e2bacbbc6469
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 9, 2026.

Transparency log

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

Download URL motedb_python-0.12.7-cp39-abi3-macosx_11_0_arm64.whl
Size 3.7 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bce9740d794da84c798181ffbb06d7cdee3ae21a24c8456343052424134c0c66
BLAKE2b-256 checksum
How to use checksums
223d8e79733ed6b36bddf186a2ad2f177c13e5cf9b294060edb5c34d558b821f
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 9, 2026.

Transparency log

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

Download URL motedb_python-0.12.7-cp39-abi3-macosx_10_12_x86_64.whl
Size 4.0 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
fe01642cb15469f7a04d960db55fb878c1c42ca7506291c928dd8666333de963
BLAKE2b-256 checksum
How to use checksums
370ea7284c537b4940354c0fb00deed91a9845f02b8f5cbf14253bcf928ac48d
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 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.14.0

6 release files

0.13.0

6 release files

0.12.9

6 release files

This release

0.12.7 This release

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