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.15.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.15.0
File Size Uploaded Provenance Actions
motedb_python-0.15.0.tar.gz 2.2 MB With provenance Details for motedb_python-0.15.0.tar.gz

Built distributions (wheels)

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

Total release size: 22.3 MB

Release files / motedb_python-0.15.0.tar.gz

Download URL motedb_python-0.15.0.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3848f1e9b1e7341109340b2ffdc0f708c6445fc848667307604e482830c95453
BLAKE2b-256 checksum
How to use checksums
70fe4c0b26ae68ecfbfd56efdf5262d00c88f5f0d1fbd23aabd0b0ff4857cf01
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 17, 2026.

Transparency log

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

Download URL motedb_python-0.15.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
fbb130f79a1019dc6a3d00e0326b37941d007a55edecdbab1c5402d3624081a5
BLAKE2b-256 checksum
How to use checksums
ff4489e35cb91ee5c5820796602f69829f837265f11959dfbe0b87771a10d193
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 17, 2026.

Transparency log

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

Download URL motedb_python-0.15.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
111c2466010f723f550dc008903bc90584858eb23a6e66e18c47ba8092433855
BLAKE2b-256 checksum
How to use checksums
49fa7163f51e28bde9ef3c9e4a49a6f89176925bcfc0b048d7b6de557e7c4ec9
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 17, 2026.

Transparency log

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

Download URL motedb_python-0.15.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
dbd40f1f2dac23af13409d26f5416957371376ef16f67171198751e88f6d5582
BLAKE2b-256 checksum
How to use checksums
a3aaf158d30afb5928e046031594d7e00875a42f392627e5a934b2031a8d5c7c
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 17, 2026.

Transparency log

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

Download URL motedb_python-0.15.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
209e1bef6ac8b2378eaff39fe2f0185e326b8115d7bb12cb40c5a5bc1b4b71d2
BLAKE2b-256 checksum
How to use checksums
ef5fbf60c85f40decbb87f53fd09ec307d5c90ff6caf994a729072df3d7795e4
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 17, 2026.

Transparency log

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

Download URL motedb_python-0.15.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 4.2 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f87ef8038878ea61ac318569bd86607c1f711040240c03468df30fb2c6d98fb6
BLAKE2b-256 checksum
How to use checksums
cc5feb8ae14a8de3f0d2c8cef93b7537f481cc193565db891fc91739f9817097
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 17, 2026.

Transparency log

Security for motedb-python 0.15.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for motedb_python-0.15.0.tar.gz

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 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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