LorealDB: Open-Source High-Performance Embedded Python Database Engine
LorealDB is an open-source, high-performance, read-optimized embedded database engine built using Redb, simd json, crossbeam channel, Rust and exposed natively to Python. It stores JSON documents as raw bytes and automatically creates a background metadata index, allowing for lightning-fast querying and filtering without the overhead of heavy runtime parsing.
Not just another rust KV store wrapper.
Lorealdb is created to end your data storage headache with just one single, simple, highly optimized, and highly rustified tool.
✨ Features
- Dead Simple: No configuration, no servers, no ports, no drivers, no third party tools. Just point it to a file path and start saving data.
- Blazing Fast I/O: Built natively in 100% Rust for zero-cost abstraction.
- GIL-Free Reads: Database reads release the Global Interpreter Lock, allowing true multi-threading in Python.
- Asynchronous Writes: Upserts are pushed to a high-speed Rust MPSC channel, never blocking your Python thread.
- Auto batching: Database operations are automatically executed at every 10ms from the MPSC channel.
- SIMD-accelerated validation: JSON data is validated at CPU vector speeds.
- Native Types: Pass Python
dictobjects in, get Pythondictobjects back. Rust handles the serialization invisibly. - Prefix Scanning: Efficiently query ranges of documents using key prefixes.
- Batch Operations: Fetch hundreds of keys at once with zero order-scrambling and memory-safe pre-allocation.
Benchmarks
Installation
Install the package using your favorite Python package manager:
pip install lorealdb
Or if you prefer using uv:
uv pip install lorealdb
Note:
DBEngineis read-optimized. It natively accepts standard Python dictionaries, transparently converting them to raw bytes to automatically build a high-speed metadata index in the background.
Available Engines
- DBEngine: A fast embedded JSON database with SIMD powered JSON/Dict validations.
- DBEngineWebServer: A scaled JSON database for Python web frameworks.
Upcoming engines (in development)
- DBEngineVectorStore: A document database + vector store for RAG and AI workloads.
- DBEngineGraph: A graph document database for AI workloads.
- DBEngineWriteOptimized: A document database storing AI conversations at scale.
Quick Start
from lorealdb import DBEngine
# 1. Connect to your database (it creates the file automatically)
db = DBEngine("my_data.redb")
# 2. Saving a complex Python dictionary
# The Rust engine automatically handles serialization natively.
app_settings = {"theme": "dark", "notifications": True, "version": 1.2}
db.insert("settings", app_settings)
# 3. Reading the data back
# The engine automatically deserializes the bytes directly into a Python dictionary.
settings = db.get("settings")
if settings:
print(f"App Theme: {settings['theme']}")
# 4. Deleting a record
db.delete("settings")
Metadata
Release files for lorealdb 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| lorealdb-0.1.4-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| lorealdb-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| lorealdb-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| lorealdb-0.1.4-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| lorealdb-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 4.7 MB
Release files / lorealdb-0.1.4-cp310-abi3-win_amd64.whl
| Download URL | lorealdb-0.1.4-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 813.2 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b300862ddcb5e08646decadbc81318e34150a7cac14c792beba273cea289a7fd
|
|
BLAKE2b-256 checksum How to use checksums |
41d7bec95c0949cfd12798d0943142239d4730037fa9983f90694725f051ed57
|
| 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 Aug 4, 2026.
Transparency logRelease files / lorealdb-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | lorealdb-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d9e1fdfd84a7081a0234d8c7be5a1ccdfdf09decb610d326991c518517b7c1b7
|
|
BLAKE2b-256 checksum How to use checksums |
ca2b7e9d4eff96f6d4b88cf4cdada98a727e15bd084b19a6b7d94457d2baf995
|
| 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 Aug 4, 2026.
Transparency logRelease files / lorealdb-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | lorealdb-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 978.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
54657ab51339654b3d767b1893ef03b8ff87768ceb39f4c7e57aeb7304adf028
|
|
BLAKE2b-256 checksum How to use checksums |
4354eabd5f06ea804ad1206e6ef9d54fdbb0fe6fc046a0912bfaa5b7b6718963
|
| 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 Aug 4, 2026.
Transparency logRelease files / lorealdb-0.1.4-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | lorealdb-0.1.4-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 892.3 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
014a4ecbd29c6183f69798363242e57f93920d034accad780e15fc009bfd8720
|
|
BLAKE2b-256 checksum How to use checksums |
20acae84f6b6633e8d21362cd4f4d6d7d75bf08901c289377dd05a53e8664797
|
| 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 Aug 4, 2026.
Transparency logRelease files / lorealdb-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | lorealdb-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 954.2 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
abae6fa3dc4b061911e714362525afb212086cfc2ca5663a4d324a7a2e7c1064
|
|
BLAKE2b-256 checksum How to use checksums |
3149ac006de67b6fb610a1513afd4413468de5edd4847045d01418e1a4ee80f8
|
| 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 Aug 4, 2026.
Transparency log