Preview · Embedded Document Database

MonaDB

MonaDB is an embedded document database for Python. Write SQL-like queries against nested documents. No schema, no server, no migration scripts. Backed by a Rust bytecode engine inspired by SQLite.

pip install monadb copy
monadb ❯ console v0.1
# select: filter and project a document stream
import monadb
db = monadb.connect("data.mona")
rows = db.sql(
    "select {x, y} from points where x > 1 fetch 10"
).fetchall()
  compiled to bytecode stack VM · LMDB
Embedded
No server, no daemon, no config
Schemaless
Nested objects, arrays, no schema
SQL
Supports SQL-like syntax
01

Why Use MonaDB?

Use cases
01 · Documents First

Documents

Objects, arrays, and path traversal are core constructs, not extensions. Schemas are optional.

02 · Execution

Bytecode

Every query compiles to bytecode before it runs. A tight Rust dispatch loop executes the instructions. No tree-walking at query time.

03 · Runtime

Embedded

Backed by LMDB and runs in-process alongside your code. No server, no daemon, no config file to babysit.

04 · Concurrency

Transactions

Reads and writes are fully transactional. Readers never block writers, and partial writes never surface.

02

How It Holds

Documents are first-class.

Objects, arrays, and path-style traversal live in the language model. A table can carry a full schema, a partial one, or none at all.

Compiled, not interpreted.

MonaDB compiles each query before running it. The compiled instructions execute in a Rust interpreter. No query is evaluated line by line in Python.

The database is a library.

MonaDB runs in the same process as your code and reads from a single file on disk. There is no network hop between your application and your data.

Familiar, with fewer corners.

Most of the SQL you know carries over. What's left is smaller, more regular, and friendlier to nested data.

Get Started

Start With One Line.

Install MonaDB and open a Python shell. No server to start, no config to write.

pip install monadb copy