darudb
The Python package of DaruDB, an embedded database that keeps an application's data in one local file. It is a native extension over the DaruDB engine, which is written in Rust, so the same file reads the same from Python, Rust, Node.js and Dart.
Installation
pip install darudb
The package needs CPython 3.11 or later. Wheels are built for Linux (glibc 2.17 or later, and musl), macOS and Windows, on x86-64 and ARM64, and for the free-threaded build of Python 3.14 as well, so installing it needs no Rust toolchain.
Usage
Each collection is a class. The decorator makes it a frozen, keyword-only dataclass, and its annotations are its fields' types; field adds an index, a primary key, a link or a default:
import darudb
from darudb import F, field, where
@darudb.collection("users")
class User:
id: int | None = None
name: str
email: str | None = field(default=None, unique=True)
age: int = field(default=0, index=True)
db = darudb.Database.open("app.darudb", schema=darudb.Schema(1, [User]))
with db.write() as txn:
txn.collection(User).insert_many([User(name="Alice", age=31), User(name="Bob", age=17)])
with db.read() as txn:
users = txn.collection(User)
adults = users.find(where(F.age >= 18).sort_by(F.age, descending=True).limit(10))
same = users.find("age >= $0 SORT BY age DESC LIMIT 10", 18)
db.close()
A write block commits when it ends and aborts when it raises, and db.write(durability="deferred") commits without waiting for the disk. An object read is an instance of its class. Every failure is a darudb.DaruError whose code is the engine's, the same string in every language DaruDB ships to.
The engine releases the GIL while it works, so other threads run while one waits for the disk. Every operation also has an asynchronous twin for asyncio, which runs the engine's work on a thread of the package's pool:
db = await darudb.Database.open_async("app.darudb", schema=darudb.Schema(1, [User]))
async with db.write_async() as txn:
await txn.collection(User).insert(User(name="Carol"))
async with db.read_async() as txn:
count = await txn.collection(User).count()
await db.close_async()
Raising the schema's version migrates the file when it opens, with renames, deletions and a Python function of your own. Encryption, the integrity check, backup, compaction and salvage are all there; the guide has the details.
License
Metadata
Release files for darudb 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| darudb-1.0.0.tar.gz | 440.7 kB | Details |
Built distributions (wheels)
Total release size: 16.1 MB
Release files / darudb-1.0.0.tar.gz
| Download URL | darudb-1.0.0.tar.gz |
|---|---|
| Size | 440.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e03786fd88d57d9c5c01bbcc18d894bc24d126480d43768f697922ce2a1d3cc4
|
|
BLAKE2b-256 checksum How to use checksums |
4e6454a18474f5c49e11ff7824d43bd28d84b809e61fd527de0cb57a17458928
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-win_arm64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-win_arm64.whl |
|---|---|
| Size | 846.0 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows ARM64 |
|
SHA-256 checksum How to use checksums |
9510104dbf492f9b1c906234508973026f8e8a2e2bc6cf109bf486369d1ed370
|
|
BLAKE2b-256 checksum How to use checksums |
1615e2bd6ec32000f106eaefa93ccbc39741d21ea3b51f720ecf50d5a1f267f1
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-win_amd64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 922.7 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c75208a6b25a2fea60853892338b300b762c5bc4871d9c80acddb14c93b6f048
|
|
BLAKE2b-256 checksum How to use checksums |
b52fbffba788b4d781b0fae50cd642f52aa1203f3b23b8bb9e06abb6a1a7a70a
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
edcb3ea5d49a790eb9e1f771f1a5fcf54f627a829cffa7eddab8b889b0364aec
|
|
BLAKE2b-256 checksum How to use checksums |
8f25a4013e4b7e3f83cc5e3b3c8eff151d07e65ebd092c5a3febaf14b506b6da
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 944.0 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
ea3e2d167d6334887d7ce040dd70fec4e31896dc0b18bed14a040a4fbe8f4892
|
|
BLAKE2b-256 checksum How to use checksums |
47a1424c1407aa22a8e326b8daf6b0e332a3e18361fe9159b2410414c11857f6
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 956.4 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
26b3709c2957590361b962366ec975a011d521d48b338d5348ab0f93e52073fb
|
|
BLAKE2b-256 checksum How to use checksums |
e0d89bd7d4e64805f2a4e3ddd4f020708a336b6cf9c4b78675a4e149c032276b
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 873.9 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
c439413185d4b0e97e52c034c4b41894350f289c21f21af2e918c3bf556e31bc
|
|
BLAKE2b-256 checksum How to use checksums |
2ec7896488b540d8c39188becc75d8062086a2c8d24d572bd106b472ce9cb66f
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 843.3 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
da460a9052354f65dcef415d2d2018c1489c8b0b216cdb393204b3db9a77392d
|
|
BLAKE2b-256 checksum How to use checksums |
1e0fc4dd88ef873f54a0842c86c405c44c8cc223d616a8f802e42b498129695c
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp314-cp314t-macosx_10_12_x86_64.whl
| Download URL | darudb-1.0.0-cp314-cp314t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 934.5 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
eb718d16102d79d8d71b3b2baf4c6a5cc9ccd565c8c002c46fdd7c33d0105d66
|
|
BLAKE2b-256 checksum How to use checksums |
5e74479d97b31ea51a74c6225945fc400eae0608e26315966bc3be613784a495
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-win_arm64.whl
| Download URL | darudb-1.0.0-cp311-abi3-win_arm64.whl |
|---|---|
| Size | 854.5 kB |
| Tags | CPython 3.11 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e09b0bf8c1f084f13db74d045b1deeb22d729eb28a64296f16fc079f471b28eb
|
|
BLAKE2b-256 checksum How to use checksums |
7eae29bd8f2124f1a527b932154479175faa8e699c68990a664357052f53d336
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-win_amd64.whl
| Download URL | darudb-1.0.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 931.3 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9212363ea01e73fc349b5030bfd220f4ca6a03079f2a70bed3a6f3e0895f439c
|
|
BLAKE2b-256 checksum How to use checksums |
11f7810c90c467b9d78b7e86df81cdfdcf0cb2d3bffb24d5c35c4448b029193c
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-win32.whl
| Download URL | darudb-1.0.0-cp311-abi3-win32.whl |
|---|---|
| Size | 898.5 kB |
| Tags | CPython 3.11 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
959890ecda8622ddf1a6b22099be3a421eece018a81c8027110e2a938ec3d6dc
|
|
BLAKE2b-256 checksum How to use checksums |
e8ded6ba99a4b467e84488aab4cb24c14819ee7db467cfdcdb5806d50f9ebf0a
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl
| Download URL | darudb-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
597070952b88acfd4534b60d75eff3678b3fed78a65d4c747d277c6ca0d9f9ba
|
|
BLAKE2b-256 checksum How to use checksums |
8a885cd3f94abd909efd8d21830aaf04929c1ff3167bdf2e6b64fcdb456f6cf0
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-musllinux_1_2_aarch64.whl
| Download URL | darudb-1.0.0-cp311-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 948.6 kB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
2a9d109b133381bdffd727972224914adde5f656ee8b496a3edb49b83df6e3c2
|
|
BLAKE2b-256 checksum How to use checksums |
528b1e47496e02b66d16f80dde162105b02eaf56d0d933c6b40041b9af595769
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | darudb-1.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 962.0 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
28e88518cdf9a6d2df4326f81181203e5d4036d2ecfe90494ee7c85002751910
|
|
BLAKE2b-256 checksum How to use checksums |
7b5e37475cb0eefcb9fa287e9da23bee294e892bbc1aaa18b0c019250d397277
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | darudb-1.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 879.5 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
3834fc7f5f1ad5eaeae50a093901561e5ff8b8af2fc72f5cb1ed9609e544574d
|
|
BLAKE2b-256 checksum How to use checksums |
565ac1862163e97247e213053cf92ea4563fece0e3916eb558a5d7888c54b061
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | darudb-1.0.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 851.9 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a617a406a8258e3ff4a67d87d4e5d1186d87c6c29ed4cd69a2f85afb61fa505f
|
|
BLAKE2b-256 checksum How to use checksums |
0994815d49e5900867706dad6c7109155f80e8fffe98ca281a551602c8d6ca91
|
| 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 7, 2026.
Transparency logRelease files / darudb-1.0.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | darudb-1.0.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 930.2 kB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
840504f02f3dfd3545733560d174da3ccc2c4fca98869dfe97dba9480d7d7d96
|
|
BLAKE2b-256 checksum How to use checksums |
818f510458d7b4f4c646e626e4dec0c9d1f710384506053700e525dd97e0f078
|
| 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 7, 2026.
Transparency log