Skip to main content

refpot

RefPot — embedded, relational, simple

Part of ModePot.   Project website   Created by Tugrul Guner

A custom embedded database preview for Python.

RefPot is an experimental alpha: a native C++ redo-and-checkpoint engine with Python CRUD and explicit transactions. Version 0.1.1 is the first release; until its public-index installation is verified, use the release-candidate artifact rather than claiming it is available from PyPI.

CI Python 3.11 through 3.14 Experimental alpha MIT License Join the ModePot Discord GitHub stars

Quick start · Why RefPot · Package contract · Documentation · Deep reference · Examples · Agent skill · Community · Contributing

Planned RefPot architecture, not shipped: direct SQL and a Python ORM's structured operations share one execution core, validation, constraints, transaction guarantees, storage, and recovery

Why RefPot

RefPot is an early custom embedded database engine: a native C++ redo-and-checkpoint core exposed through a small Python Database / Row API. The package preview already supports fixed-schema CRUD and explicit transactions; it is not merely a research design. SQL and ORM are future design direction, not shipped interfaces.

Quick start

Requires Python 3.11–3.14. Once public-index availability is verified, install the experimental alpha with python -m pip install refpot==0.1.1. Matching prebuilt wheels target Linux x86_64 and macOS arm64; other source builds require a C++17 toolchain. Before publication, build the release candidate from the repository root:

uv pip install .
python - <<'PY'
from pathlib import Path
from tempfile import TemporaryDirectory

from refpot import Database, Row

with TemporaryDirectory(prefix="refpot-quickstart-") as directory:
    path = Path(directory) / "example.rp"  # The parent directory must exist.
    with Database(path) as db:
        db.insert(1, 42, "answer")
        db.update(1, value=43)
        assert db.get(1) == Row(1, 43, "answer")
        with db.transaction():
            db.insert(2, 99)
        try:
            with db.transaction():
                db.update(1, value=100)
                raise RuntimeError("roll back this transaction")
        except RuntimeError:
            pass
        assert db.get(1) == Row(1, 43, "answer")
        db.delete(2)
    with Database(path) as db:
        assert db.get(1) == Row(1, 43, "answer")
        print(db.get(1))
PY

The example demonstrates CRUD, transaction commit and rollback, and persisted state after close/reopen. No output is prescribed here; run it to see the actual Row representation. This is a local source build, not a released install path. Also run the shipped CRUD example and transaction example.

Package contract

The database starts empty. Keys and integer values are signed 64-bit integers; text is UTF-8 limited to 31 encoded bytes. The database path names a file, not a directory, and its parent directory must already exist. One process exclusively owns each database; only its creating thread may use the handle.

The native engine uses versioned snapshots and a WAL. Snapshot and WAL recovery are each bounded to 64 MiB. Incomplete unacknowledged tails are discarded; complete transactions with both copies corrupt are rejected; uncertain writes poison the writer. These implementation details are not broad recovery qualification or a physical power-loss guarantee. Concurrent readers, multiwriter use, Windows, existing-format compatibility, SQL and ORM are unsupported. See the full package contract and package recommendation.

Current package architecture

Recorded pre-release implementation architecture: Python Database and Row use a native C++ engine; transactions synchronize duplicated checksummed redo before memory publication; checkpoint snapshot sync, rename and directory sync precede log truncation. Limits and qualifications are listed in the accessible text above.

Open the full-size editable SVG · Detailed package contract

Mutation and diff-scan paths copy maps; package performance is unqualified and this preview is not presented as benchmark-fast.

Examples

The standalone CRUD example exercises insert, update, delete, context-managed close, and reopen. The transaction example demonstrates read-your-writes, commit, rollback, checkpoint, and reopen. Run them after installation:

python examples/crud.py
python examples/transactions.py

The full task-first docs live at RefPot documentation with package quick start, package reference, status and next steps, and design direction.

Retained benchmark findings

Audited random-update benchmark: both campaigns pass the scoped service/setup/p99 matrix; reopen with full-state validation loses every cell

Detailed findings, raw evidence and reproduction · Full-size chart · Next package recommendation

The experimental findings are separate from package performance. The 3.04–5.95× result applies only to the historical update harness; it is not a package claim. The historical reopen result remains 16/16 losses. No performance ratio is asserted for this package.

Planned design direction

The preserved planned architecture visual above shows a future SQL/ORM direction, not this preview. Neither SQL nor ORM is implemented.

  • Engine first. Establish correctness and performance before building the ORM.
  • One semantic boundary. Direct operations must not bypass validation or constraints.
  • Explicit guarantees. Internal plan selection must not silently weaken durability, isolation, transaction boundaries, or result semantics.
  • Bounded maintenance. Include checkpointing, reclamation, and recovery debt in design and measurement, rather than hiding them outside favorable timings.
  • Simple public usage. Keep storage layout, encoding, and routing choices private unless a user genuinely needs an operational control.

Language, storage format, index structure, isolation model, and SQL compatibility scope remain decisions to earn through coherent experiments. A native-language rewrite alone is not a differentiator. No SQLite SQL, file-format, or C API compatibility is promised.

Performance target

At least 2× improvement over SQLite is an acceptance target, not an achieved package guarantee.

Before claiming it, define and publish a workload matrix, then retain every passing and failing cell. Compare equivalent operations, returned values, transaction boundaries, constraints, and durability acknowledgments against prepared SQLite and its best-tested configuration for each workload. Package performance remains unqualified.

Community

Join the ModePot Discord for design discussions, implementation questions, early ideas, and database use cases across the family. Use GitHub Issues for scoped proposals and reproducible findings. The experimental alpha is not yet broadly qualified.

Contributing

See CONTRIBUTING.md for setup and contribution workflow. Repository-local coding-agent guidance is in AGENTS.md, with the installable RefPot database skill for consumer-facing API boundaries. The first useful work is helping define a small, testable engine contract and qualification matrix. Correctness cases, crash and I/O-failure scenarios, reproducible benchmark methods, and low-ceremony usage designs are more useful now than a broad speculative API.

Discuss substantial architecture or public-contract changes in GitHub Issues before implementing them. Do not introduce a SQLite wrapper as the engine, publish invented benchmark output, or present research prototypes as production capabilities.

The logo source is SVG; the README uses its PNG rendering.

License

RefPot is distributed under the MIT License.

See CHANGELOG.md for changes and release guidance for release policy.

Metadata

Release files for refpot 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refpot 0.1.1
File Size Uploaded
refpot-0.1.1.tar.gz 642.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for refpot 0.1.1
File
refpot-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
refpot-0.1.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
refpot-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
refpot-0.1.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
refpot-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
refpot-0.1.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
refpot-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
refpot-0.1.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 1.9 MB

Release files / refpot-0.1.1.tar.gz

Download URL refpot-0.1.1.tar.gz
Size 642.9 kB
Tags Source
SHA-256 checksum
How to use checksums
93e1b2884efc35d99a408b38a4548f382c6e0f5ade290cd3087eba3a0c9da76d
BLAKE2b-256 checksum
How to use checksums
986432a9c0b7f395484595dd825ff26af0a842b805873d6552f87fdd8cfc837e
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL refpot-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 199.4 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2b2be340b99b013c80214ef768f8a1daa7d268141ce8556af648967d1ebc4c94
BLAKE2b-256 checksum
How to use checksums
40a42c4bda48729e41952d949dcb01f0bcbcf4c0924fa075db19943865a5bd9b
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL refpot-0.1.1-cp314-cp314-macosx_11_0_arm64.whl
Size 103.5 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4a84f2f2e48ed3a15e5b04a6bc107ebbf679e1c27ba76231dfb097b82eefcfac
BLAKE2b-256 checksum
How to use checksums
0748bf0edf69fd04b9e590de1977fcba3fb4a0e13d55a478733f062672d94936
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL refpot-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 199.3 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7d9a168fcd9196f6c2190c280c29a040b6924d1a361f639671edd9f0af88161b
BLAKE2b-256 checksum
How to use checksums
bac193a62949aa7593332759c4961ce443fb4af2cf70a5742cb4c2fa5dc6d3d3
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL refpot-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Size 103.3 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
25de3f411cc39a6d05cf8622c47d534bb79a6acd2686bc22dea949c8a0477686
BLAKE2b-256 checksum
How to use checksums
27b7dfe1539b557a9ce3305abd7c934dc5b137220f8f78fad291607fb7fe9350
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL refpot-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 199.3 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
080adabbef3f0d9280ad9b7f3444c7e45554228c66589ddb589509faed487aad
BLAKE2b-256 checksum
How to use checksums
c3023430e66e738b9e329da55fd7f5800b3366320906bbe5b25a5aaece47a5af
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL refpot-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Size 103.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
384b6afa43f2877e746882a3051796ef0407916dac67e25b0bcf5e407f4d230f
BLAKE2b-256 checksum
How to use checksums
ce9223d4cfff7ec6ad67250a3ac729b4e32631b157873238086eff0b4437abb8
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL refpot-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 198.4 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ca3c080a53a6235dc2be17089c33023e868ce0a5b68d589b35711b0b7a854a52
BLAKE2b-256 checksum
How to use checksums
b62c19618167a1d6facafdb521a2596b03bbd6f1522f7629194c1c0fa9c1ef32
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 12, 2026.

Transparency log

Release files / refpot-0.1.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL refpot-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Size 102.9 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
60e233a55a8089734be80a2da44be8ebefda2e3c9863a550be6debe9b1ac65aa
BLAKE2b-256 checksum
How to use checksums
52edbdbe703270742bd696829cdd30125e52b5b0d9d5ac0ef847f85f8a51d053
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

9 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