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.5.tar.gz (599.3 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.5-cp310-abi3-win_arm64.whl (954.8 kB view details)

Uploaded CPython 3.10+Windows ARM64

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

Uploaded CPython 3.10+Windows x86-64

burner_redis-0.1.5-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.5-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.5-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.5-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.5-cp310-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

burner_redis-0.1.5-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.5.tar.gz.

File metadata

  • Download URL: burner_redis-0.1.5.tar.gz
  • Upload date:
  • Size: 599.3 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.5.tar.gz
Algorithm Hash digest
SHA256 19280d9f6a531ad57e75f0e9b877372547229d9d3014181def56718cbc66f88d
MD5 1834b89e1c636f196fd3ebec2393ebfe
BLAKE2b-256 00fc802f0fb691a3ff6467240cf89d2a596307f0c37fc5c79fbdfbe800cf5011

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: burner_redis-0.1.5-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.5-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 bc8355294c251f1523b0375f864ccaad4b88a813d97ade6a5a01d433a1665d64
MD5 c83e5e327c75ff1dcde3c28c67ed98ac
BLAKE2b-256 dee1427a728f409cd857de4a9f2ca0ab65ce7676b4e93eab44306c50c0caee3f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: burner_redis-0.1.5-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.5-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8cca59d84e5b1a26e13e8a0501dda6448d5aefa49d3566bba83591e7e2b16ee6
MD5 cde8b69f6b667b176e39dd085ebaa502
BLAKE2b-256 eb5c1c6b7012b60c7827652fb3b2b748409e0a84c3a47d4b597e44bb91b46551

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for burner_redis-0.1.5-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b7fd2228d428cf489c7ac8bccf97e977ac200b2cdf8ceb3b5d2c2682d749dec7
MD5 e0b064311981ad1721c6a25d450befc4
BLAKE2b-256 a3a1f361e4f0948c4251b7af95fca7a01665766054516b1da80de6a033a3aafe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for burner_redis-0.1.5-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f774e969282e798e21944dd7eb5d0c29d5d7aec1f709472355ab21adb4dc797b
MD5 454b22b01e618f855c6c6a1f25fdb6c3
BLAKE2b-256 c48495689b17f45d38086ff9ab3cf3ac884b473bb59c13f4b2275e7486c38506

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for burner_redis-0.1.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 50c1ce29ac13e77e86ba5de2615411946d62caafef59f4fcf3e015009182aa91
MD5 5b60ef52de47745530811afedd311904
BLAKE2b-256 fd9b4f9c6664dd2d94e1c383c87ebe9fa5e17cc9a63cb245b1fdbb399be178f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for burner_redis-0.1.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f52d42dfa86746b41395bea7379341821c5dab2f453302f5726c806b89cba8d8
MD5 f546599e27391ef1053e6f86d2cf8fae
BLAKE2b-256 648478ddb6611e7bd58a5630a314ac55536c50a17d4fd945712216ac8c2229aa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for burner_redis-0.1.5-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 34ad2e08dad7617cde3411be6b6ed02e8fe5dab6b169e448cb46007bde712449
MD5 0c622bfe1e582ddf8c3122b259740fdb
BLAKE2b-256 58a3a2145a5cbe980e2d90da074f688f7399d51bc252dcbdb0d316ee3cd0a374

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for burner_redis-0.1.5-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ff722be5d64a705f8268a85a418fce35173172db157da046228a38960d237a94
MD5 135f10ab490b3a1e78db28700d08c352
BLAKE2b-256 917d3e0ac91f8b0f4a81d6b4a533b0332c287e63884e29573cf4c1f71f245c61

See more details on using hashes here.

Provenance

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