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.10+. Pre-built wheels available for Linux (x86_64, aarch64), macOS (x86_64, arm64), and Windows (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

Packaging notes

Wheel builds use a vendored Lua 5.4 by default so pip install burner-redis does not require a system Lua.

Packaging systems that already provide Lua can opt out of vendoring and link against that copy instead:

maturin build --release --no-default-features

If auto-detection is not available, point Cargo at the packaged Lua library explicitly:

LUA_LIB_NAME=lua
LUA_LIB=/path/to/lib

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.6.tar.gz (843.1 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.6-cp310-abi3-win_arm64.whl (1.0 MB view details)

Uploaded CPython 3.10+Windows ARM64

burner_redis-0.1.6-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

burner_redis-0.1.6-cp310-abi3-musllinux_1_2_x86_64.whl (1.6 MB view details)

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

burner_redis-0.1.6-cp310-abi3-musllinux_1_2_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

burner_redis-0.1.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

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

burner_redis-0.1.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

burner_redis-0.1.6-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

burner_redis-0.1.6-cp310-abi3-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: burner_redis-0.1.6.tar.gz
  • Upload date:
  • Size: 843.1 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.6.tar.gz
Algorithm Hash digest
SHA256 362091d98c09953ef99be8bd026d75fad42599a0f153211e1a22d3e3029c7cfb
MD5 7e24d0e08cfa13049d282425c5b9b64d
BLAKE2b-256 c86fec3eeb9e3e9d7fedc51fcb56dd09da0f164495ab6fdf4caaa3754ceed659

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6.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.6-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.6-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c2583e98f9a3836ac2c6243ea0c8d56b40e7017b46617991e329bc807c544bad
MD5 98eb4acbc9fa9934d796cf010835eee1
BLAKE2b-256 c0ba18668d92e18210150f7f93e2930264ad77a82e4d3e5f74ca1aecc002f78f

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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.6-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: burner_redis-0.1.6-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.1 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.6-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 98c6b6fc397617cd5a6778ac020e4ed9985c393ad204f9f5cf524b68ae16070b
MD5 e9148599c6175ab9567447c79c6f2618
BLAKE2b-256 a08c302638fdad4476d4760d477b0f3c6b96c0f88d3f278e5f14d06eb048f788

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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.6-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.6-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5b6ba097d910effff00a4610160a4a759503ad590e2c47a580bdcdac9a325823
MD5 814cd8978b052c20bb168e6bab705f21
BLAKE2b-256 b3230651cf86bc5ed390fef09e30ff4a4664cc3c5b88ddf4c6b8d905acc0d60e

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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.6-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.6-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3b43f983b6e8fbc208734f04b0bae8cf95323fc43105f977d20f0993fc28c1b3
MD5 42c606e5a6f3e83f61c49ad586f93ddc
BLAKE2b-256 bd22369338d6372abd12dee51965566428c06f3badd95f668ff1c11680b99b30

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1e3dff7d691ab0035468c17f51632e452b075065a30e026278ed1b297441ce93
MD5 fa0b41ea0f06279f8186f1d82ccb08be
BLAKE2b-256 068a4f72de7f967532d3739caa461625dc9122f0ca0d46faa883c153a10d0117

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d0ce82edea4ed1ec34448a8610c62665517b3d2030254f31af32828b070a92a8
MD5 2d1188f95e29a51956f647963023ebbf
BLAKE2b-256 2ebe718af7f42bbebbfbfd771ba43697526c922dff54d1b0d62654e21418b25e

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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.6-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.6-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f29caae7f80fea2e47350df24264a049aeaa934454210cddcadc2336ee8b423a
MD5 8b2747ed9eb44241d1fc2264a8f8e257
BLAKE2b-256 db24e4c6fb37d059b268c2a26b173d3f84b49547e837340983d3d018c08191c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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.6-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for burner_redis-0.1.6-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5dc9c170b9994b8d57958041857f240d1b0b9ac1559d0d35473f03fb62386dea
MD5 f93f8f1a48c4f5e2999e20cda989e962
BLAKE2b-256 d6cc061897380b88c637e4bea1f6715ffba851d10b16d6610f2832ab61fa15b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for burner_redis-0.1.6-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