Skip to content

MODEPOT · EXPERIMENTAL ALPHA

A custom embedded database for Python.

RefPot is an experimental alpha: a native C++ redo-and-checkpoint engine with a small Python CRUD and explicit-transaction interface. Check PyPI for the latest published version; qualification remains limited.

RefPot experimental alpha — a native C++ database with Python CRUD and explicit transactions. SQL and ORM are planned, not shipped.

INSTALL FROM PYPI

Try the experimental alpha

python -m pip install refpotQuick start guide
Experimental alpha. Package and platform qualification remains limited. No general performance claim or production durability guarantee is made.

Install RefPot with python -m pip install refpot, then save this complete program as first_database.py:

from pathlib import Path
from tempfile import TemporaryDirectory
from refpot import Database, Row
with TemporaryDirectory() as directory:
path = Path(directory) / "notes.rp"
with Database(path) as db:
db.insert(1, 42, "answer")
db.update(1, value=43)
assert db.get(1) == Row(1, 43, "answer")
with Database(path) as db:
assert db.get(1) == Row(1, 43, "answer")
Terminal window
python first_database.py

This is executable package behavior, not a site simulation. See the quick start, CRUD, transactions, persistence, and errors and ownership guides.

This diagram shows the current experimental alpha package implementation. Package and platform qualification remain limited.

RefPot experimental alpha architecture: row-local change sets are prepared before synchronized duplicated redo and nonallocating publication; recovery applies validated effects to affected rows. Checkpoint publication syncs, renames and directory-syncs a snapshot before WAL truncation.
Experimental alpha implementation; qualification remains limited. Full package contract · Full-size editable SVG.

Run the shipped CRUD and transaction examples

Section titled “Run the shipped CRUD and transaction examples”

The preview supports caller-provided signed-64-bit integer keys and values, UTF-8 text up to 31 encoded bytes, CRUD, and explicit transactions. The parent directory of a database file must already exist. Build prerequisites, ownership, recovery behavior, errors, and limits are in the package contract.

From a checkout with a C++17 toolchain, run the literal install and shipped examples:

Terminal window
uv pip install .
python examples/crud.py
python examples/transactions.py

The examples use temporary files, exercise inserts/updates/deletes and commit/rollback, then reopen persisted state. They run the native package; this site does not simulate database execution. The example sources are the executable reference.

A database is exclusively owned by one process and usable only by its creating thread. Snapshot and WAL recovery are bounded to 64 MiB each. Incomplete unacknowledged tails are discarded; complete transactions with both copies corrupt are rejected; uncertain writes poison the writer. These implementation details do not establish broad recovery or physical power-loss qualification. SQL, ORM, concurrent readers, multiwriter operation, Windows, and existing-format compatibility are not supported.

The six-cell actual-package screen compares public Python calls with prepared SQLite. Three cells remain below 2×, so the overall SQLite target remains unmet. Provenance identifies source revisions represented by wheels labeled 0.1.1; these are not measurements of package artifacts built from 0.1.2 metadata. See the full package results and the reproduction guide. Historical update-harness ratios and reopen losses remain separate evidence.

Read the exact package contract, status and next steps, design direction, performance qualification method, and canonical roadmap. SQL and ORM are design direction, not shipped functionality.

Historical random-update experiment: both campaigns passed the scoped service, setup-inclusive and p99 comparison; reopen with full-state validation was slower in all 16 cells.
Historical prototype evidence, not a benchmark of the published Python package. Full results, fairness contract, raw evidence and reproduction · Full-size chart · Editable SVG.

The 3.04–5.95× service and 2.99–5.91× setup-inclusive results apply only to the historical existing-row update harness in a Linux ARM64 Docker/ext4 VM. This is not a package claim. The experiment retained 672 records across two campaigns; reopen with full-state validation remains 16/16 losses, and earlier failed experiments are preserved. Package performance is unqualified; the broad 2×-over-SQLite objective remains an acceptance target.

Read the accessible per-cell results and audit before citing a ratio. The performance qualification method explains what a future package comparison must establish.

The contributor guide covers native development setup, test/build commands, changelog fragments and the release boundary. The coding-agent guide documents public API limits, repeatable examples and uncertain-write handling; installing RefPot does not automatically install that skill. Join the ModePot community for discussion or use GitHub Issues for scoped proposals and reproducible findings. RefPot is MIT licensed.

Planned RefPot architecture, not shipped: future SQL and structured ORM operations converge on one proposed execution core, validation, transaction guarantees, storage, and recovery.
Planned SQL/ORM direction only. The native package preview above is a separate shipped implementation.

Continue to the package quick start and source-build instructions, then browse the shipped examples on GitHub.