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.18.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.18.0
File Size Uploaded Provenance Actions
motedb_python-0.18.0.tar.gz 2.6 MB With provenance Details for motedb_python-0.18.0.tar.gz

Built distributions (wheels)

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

Total release size: 50.9 MB

Release files / motedb_python-0.18.0.tar.gz

Download URL motedb_python-0.18.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
849ea279343acd6b25a833d70ce261a727553a3c89d6f58ae4795e4396eb5c3b
BLAKE2b-256 checksum
How to use checksums
5c685aea4c4b1996880ebf51f49023a43d8527c77f028c4c71ddba58c911b525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

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

Download URL motedb_python-0.18.0-cp39-abi3-win_amd64.whl
Size 9.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
477d6b461af0f5fc8886e34da8e0ca4f9d75755bf9a741cac6ceb60a83824a67
BLAKE2b-256 checksum
How to use checksums
dab2befaee278bada15e30e3cc78805164db41a34ee337c77027f591ca20166e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

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

Download URL motedb_python-0.18.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 10.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9b83a9b41f91b3c3cd28caf888c64fff75e991789791271ce033db6b7a9145f4
BLAKE2b-256 checksum
How to use checksums
9d89ca978cac8ff747948dc5ea951264b46d445923eacc4493cbec234f0fed1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

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

Download URL motedb_python-0.18.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 10.2 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
8fecbf4930d98f37d36f29cd7718412aee1a818729bbaeeed20911fd7d00da49
BLAKE2b-256 checksum
How to use checksums
b51d91fa491d15a510ea941ca645e4e0d4d8f1886943c14dbd526d6c3affda5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

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

Download URL motedb_python-0.18.0-cp39-abi3-macosx_11_0_arm64.whl
Size 9.3 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ac64146846613e5279b57321c2ef10d6db62291e164636180955fe95ea21a491
BLAKE2b-256 checksum
How to use checksums
80cb788ec451a832860c3b37112fc6a798509aeb8b00b51f2b23afb147310859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

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

Download URL motedb_python-0.18.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 9.6 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
17fcc698c93edb3e13199d5e40de875d21b3ddde059295d9d0bb6627447c9239
BLAKE2b-256 checksum
How to use checksums
e3e803a57d9f8112c2089173bb1b5c8e50c640f43c1d0e0fd12ec027d574ef76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Security for motedb-python 0.18.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.18.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 Nov 6, 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