Skip to main content

PicoVolt for Python

For 2.0, see the interface quickstart for batching, persistence and diagnostics. Use matching 2.0 artifacts.

Python bindings for the PicoVolt embedded database engine, via its C ABI and ctypes. Released platform wheels bundle the native library, so installing from PyPI does not require a Rust or C compiler.

Like the engine itself, this is for embedded use (single writer, SQL with MVCC time-travel, compile-to-.pvdb), not a drop-in for a concurrent server's primary database.

Install

Platform wheels bundle the native library, so released builds install without a Rust compiler. The compatibility floor is Python 3.9, but production deployments should use a Python release that still receives upstream security fixes:

python -m pip install picovolt

Build the shared library from the repository root:

cargo build --release --features capi

That produces target/release/libpicovolt.so (Linux), target/release/libpicovolt.dylib (macOS), or target/release/picovolt.dll (Windows). When you run from a checkout, the wrapper finds it in target/release automatically. Otherwise set PICOVOLT_LIB to the file:

export PICOVOLT_LIB=/path/to/libpicovolt.so

Usage

from picovolt import Database

with Database.open_memory() as db:
    db.query("CREATE TABLE users (id, name)")
    db.query("INSERT INTO users VALUES (1, 'alice')")
    print(db.query("SELECT * FROM users"))
    # {'columns': ['id', 'name'], 'rows': [[1, 'alice']]}

query returns the already-parsed result (a dict): {"columns": [...], "rows": [[...]]} for a SELECT, {"mutated": n} for a mutation, or {"done": True} otherwise. Other methods: open_dev, open_prod, from_bytes, export, begin, commit, rollback, in_transaction, current_tx, and the module-level version(). A PEP 249 adapter is available as picovolt.dbapi2.

For SQL executed repeatedly, prepare it once. The wrapper caches the SQL text and positional-parameter count, validates arity before each execution, and passes values through the same injection-safe binder as query:

with db.prepare("INSERT INTO users VALUES (?, ?)") as insert:
    print(insert.parameter_count)  # 2
    insert.execute((1, "Ada"))
    insert.execute((2, "Lin"))

Preparation validates SQL and retains a native statement handle. Close the statement (or use its context manager) before closing the database. A statement does not own or close its database, and executing it after either handle has been closed raises PicoVoltError.

Run the demo:

python example.py

Release wheels are built for Linux x86-64, macOS universal2, and Windows x86-64 by GitHub Actions. Source checkouts and other architectures can instead use PICOVOLT_LIB to select a locally built library.

Metadata

Release files for picovolt 2.0.0

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

Built distributions (wheels)

Table of built distributions (wheels) for picovolt 2.0.0
File Interpreter ABI Platform
picovolt-2.0.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
picovolt-2.0.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
picovolt-2.0.0-py3-none-macosx_10_9_universal2.whl Python 3 none macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 3.1 MB

Release files / picovolt-2.0.0-py3-none-win_amd64.whl

Download URL picovolt-2.0.0-py3-none-win_amd64.whl
Size 693.2 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
91aaf8cb6672e16bd2c0dbcdcecfff376b1320877f3d2e1969f209f91b7eb06f
BLAKE2b-256 checksum
How to use checksums
18e39383dc48e3d503158b05e923438e6bd917a118046a08074c3037a99368c0
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 Sep 10, 2026.

Transparency log

Release files / picovolt-2.0.0-py3-none-manylinux_2_28_x86_64.whl

Download URL picovolt-2.0.0-py3-none-manylinux_2_28_x86_64.whl
Size 866.5 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
93260ca5397ac3cb3f00d22f692d99ae6d44461b005d2ef5f85dc3a6d8841a68
BLAKE2b-256 checksum
How to use checksums
14ae5984a769b91e912303e1a520e053f06c8c7fd3e7651f384c85bdac8b5235
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 Sep 10, 2026.

Transparency log

Release files / picovolt-2.0.0-py3-none-macosx_10_9_universal2.whl

Download URL picovolt-2.0.0-py3-none-macosx_10_9_universal2.whl
Size 1.5 MB
Tags Python 3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
7d77a85145285fe89efd9620827a60722331f433011d0f47dc50ecbbd83de607
BLAKE2b-256 checksum
How to use checksums
3ef2562a874acc0fb4ca1a26f93716047ae13d0161067e5d7bb94f10fca8c25b
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 Sep 10, 2026.

Transparency log

Security for picovolt 2.0.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 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for picovolt-2.0.0-py3-none-win_amd64.whl

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 Sep 10, 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.

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