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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| picovolt-2.3.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| picovolt-2.3.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| picovolt-2.3.0-py3-none-macosx_10_12_universal2.whl | Python 3 | none | macOS 10.12+ universal2 (ARM64, x86-64) | Details |
Total release size: 6.4 MB
Release files / picovolt-2.3.0-py3-none-win_amd64.whl
| Download URL | picovolt-2.3.0-py3-none-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
107fc6fd3ba189c0092b3650dce1f3db2aa019c393cef117c8b2b3d763a50f2a
|
|
BLAKE2b-256 checksum How to use checksums |
ae97ecdf943c473ebb11ed00e6af9ceae0843bbb317b6da8ed594f6abd36dfe2
|
| 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 21, 2026.
Transparency logRelease files / picovolt-2.3.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | picovolt-2.3.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b68b00a921a3b546913dec5e6c9915c39d8ce351c8275f3e9ed200b8a42e816e
|
|
BLAKE2b-256 checksum How to use checksums |
a44d1a63e9b0c42029ee6865c9b6c10106da006098815fb487442501a17ee5bc
|
| 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 21, 2026.
Transparency logRelease files / picovolt-2.3.0-py3-none-macosx_10_12_universal2.whl
| Download URL | picovolt-2.3.0-py3-none-macosx_10_12_universal2.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Python 3 macOS 10.12+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
114c328241c4a101c0da2bb26d99c1724ef48c6d21b653ce3514cf8bec41bfd3
|
|
BLAKE2b-256 checksum How to use checksums |
bb78dceffd83f805b8acff9ff3483737fd7dc8e3fa037fe123f0d4073af9504b
|
| 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 21, 2026.
Transparency logSecurity for picovolt 2.3.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.
Attestation for picovolt-2.3.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 21, 2026.
Transparency logA 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.