Skip to main content

An embedded, in-process Redis-compatible database

Project description

burner-redis

Experimental: This library is under active development and not yet ready for production use. APIs may change without notice.

An embedded, in-process Redis-compatible database written in Rust with Python bindings. Drop-in replacement for redis.asyncio.Redis that runs inside the host process with no external server needed.

Built to back docket and self-hosted Prefect servers without requiring a separate Redis deployment.

Installation

pip install burner-redis

Requires Python 3.9+. Pre-built wheels available for Linux (x86_64, aarch64) and macOS (x86_64, arm64).

Quick start

from burner_redis import BurnerRedis

db = BurnerRedis()

# Use like redis.asyncio.Redis
await db.set("key", "value")
value = await db.get("key")

# Persistence across restarts
db = BurnerRedis(persistence_path="data.dat")
await db.set("key", "value")
# Data is saved on process exit and reloaded on next start

Supported commands

Strings

SET (with NX/EX/PX), GET, MGET, DELETE, EXISTS, KEYS, TTL, EXPIRE

Hashes

HSET, HGET, HDEL, HGETALL, HVALS, HEXISTS, HINCRBY

Sets

SADD, SMEMBERS, SISMEMBER, SREM

Sorted sets

ZADD, ZREM, ZRANGE (with WITHSCORES), ZRANGEBYSCORE (with WITHSCORES/LIMIT), ZRANGESTORE, ZREMRANGEBYSCORE, ZCARD, ZSCORE, ZCOUNT

Streams

XADD, XREAD, XLEN, XRANGE, XDEL, XTRIM, XGROUP CREATE, XGROUP DESTROY, XREADGROUP, XACK, XAUTOCLAIM, XCLAIM, XINFO GROUPS, XINFO CONSUMERS, XPENDING, XPENDING RANGE

Pub/Sub

PUBLISH, SUBSCRIBE, UNSUBSCRIBE, PSUBSCRIBE, PUNSUBSCRIBE, PUBSUB CHANNELS, PUBSUB NUMSUB, PUBSUB NUMPAT

Scripting

EVAL, EVALSHA, SCRIPT LOAD, SCRIPT EXISTS

Python-layer features

  • Pipeline — buffer commands and execute in batch, matching redis.asyncio.Redis.pipeline() semantics
  • Lock — distributed-style locking with atomic Lua-based release, matching redis.asyncio.Redis.lock() semantics
  • PubSub — async message listener with channel and pattern subscriptions
  • Script — register and call Lua scripts, matching redis.asyncio.Redis.register_script()

Persistence

Pass persistence_path to save state to disk on shutdown and restore on startup:

db = BurnerRedis(persistence_path="burner-redis.dat")
  • Crash-safe writes (atomic temp file + rename)
  • Expired keys excluded from snapshots
  • Manual save available via await db.save() or await db.save(path="custom.dat")
  • MessagePack binary format

redis-py compatibility

burner-redis implements a subset of the redis.asyncio.Redis interface — enough to back docket and common Prefect server workflows, but not the full redis-py API. Commands not yet implemented will raise NotImplementedError.

When the redis package is installed, exceptions subclass redis.exceptions.ResponseError and redis.exceptions.NoScriptError so existing error handling works unchanged.

Development

# Prerequisites: Rust 1.85+, Python 3.10+, uv

# Development build
uv run maturin develop

# Run tests
uv run pytest

# Run Rust tests
cargo test

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

burner_redis-0.1.4.tar.gz (597.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

burner_redis-0.1.4-cp310-abi3-win_arm64.whl (954.8 kB view details)

Uploaded CPython 3.10+Windows ARM64

burner_redis-0.1.4-cp310-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.10+Windows x86-64

burner_redis-0.1.4-cp310-abi3-musllinux_1_2_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

burner_redis-0.1.4-cp310-abi3-musllinux_1_2_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

burner_redis-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

burner_redis-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

burner_redis-0.1.4-cp310-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

burner_redis-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file burner_redis-0.1.4.tar.gz.

File metadata

  • Download URL: burner_redis-0.1.4.tar.gz
  • Upload date:
  • Size: 597.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for burner_redis-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ffd1019354471b2585009a99a82a6c80330e8108be5029b476c8ee2bc77e898f
MD5 53161a93c861f56c2b90a86cfebb657e
BLAKE2b-256 2a6a01e8caef76809908386e37bb304d1f5d2f322d7cfd7fac4490771fb1ca1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4.tar.gz:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: burner_redis-0.1.4-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 954.8 kB
  • Tags: CPython 3.10+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a798be6ce07bf3b6a2127006069533c2fed241ddcc24667e646882cd97762910
MD5 07ac1230daf666e4cfe9dd78bf639394
BLAKE2b-256 108ea6264e0874c4161f06cf1d09dd8849f58250d055fda0467d6999a8c7f7ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-win_arm64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: burner_redis-0.1.4-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5f3f8f6579e5519b3e127bf14bf57b989a1ab116007c20dbf4cf44e307767291
MD5 81f6b51062144dfe7c72830bf9e9014b
BLAKE2b-256 e42f690b7f01cbd7dbf6313e76c09ee722cc5e0a3c67076e6d02526f0d334c05

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-win_amd64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 881a0937148d5e407746b42093d8d506d74d0642b8888ab47e19aac856fe4023
MD5 657981d8629349863fe5044ec4b0e7d0
BLAKE2b-256 0682bda7060bebc149e7614684c7f1f701c7d97881cc699f495f0863c480a910

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f9288390e67f9c1998aec81e069c0a0757bce81a29d149e854b41e7130015348
MD5 2cca208c31f0261ea7b054d5d4cad4ea
BLAKE2b-256 4d371b5d413e0f8f20bb97c16f8bd01f6d933473d09fa3812baaa678040f0e76

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b2a9c71b593660a944fff7836df0f26ad388bfe1eea7db998195fd93e6e20d9
MD5 c8f4c752edc2cd2683b919280a97ef16
BLAKE2b-256 a548bd07f3f9557b96ed9c37a4bd39ba698ff87dcff436b9dfffddeac47a3148

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1254789b9b3eb85c6e417bc3fe0a769ca0ee749f187fc7c493c9c0b81d05fa17
MD5 e842ab9feb9ae02b2bdf1ec6217b0ee5
BLAKE2b-256 9fa7218a9079c5b272528cb6838ac4629eac6480408f56c5f9461bae43857988

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 064bf26418be38d6c6aaebe2537f55fb6eb66d89c4a2c2796eb4ef31eeba64f3
MD5 ab2fbf4ca28fedeb23da081222d2d2c4
BLAKE2b-256 d0c8e8c0a02dd602d8d2e65537ac9c6ce25dd9085837ece71e16f47db88a805e

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file burner_redis-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 476425427b39b896db5a3ce9e1cece76b9eb5daa510b92bafc97ce7eaa7ff652
MD5 b8b1c8b45380e95a268f5071cad99722
BLAKE2b-256 d4a5259177c25b5c15e55e9b5231972fe520ecdd29c34eee4e9443a3bd077175

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on prefectlabs/burner-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page