Pynenc Redis Plugin
Full-stack Redis backend for Pynenc distributed task orchestration
Documentation: https://pynenc-redis.readthedocs.io
Pynenc Documentation: https://docs.pynenc.org
Source Code: https://github.com/pynenc/pynenc-redis
The pynenc-redis plugin provides all five Pynenc backend components running on Redis, enabling production-ready distributed task orchestration with a single infrastructure dependency.
Components
| Component | Class | Role |
|---|---|---|
| Orchestrator | RedisOrchestrator |
Distributed status tracking & blocking control |
| Broker | RedisBroker |
FIFO message queue via Redis lists with blocking pop |
| State Backend | RedisStateBackend |
Persistent state, results, exceptions & workflow data |
| Client Data Store | RedisClientDataStore |
Argument caching for large serialized payloads |
| Trigger | RedisTrigger |
Event-driven & cron-based task scheduling |
Installation
pip install pynenc-redis
The plugin registers itself automatically via Python entry points when installed.
Quick Start
from pynenc import PynencBuilder
app = (
PynencBuilder()
.app_id("my_app")
.redis(url="redis://localhost:6379") # all components on Redis
.process_runner()
.build()
)
@app.task
def add(x: int, y: int) -> int:
return x + y
result = add(1, 2).result # 3
.redis() registers every component at once. Start a runner with:
pynenc --app=tasks.app runner start
For a complete working example with Docker Compose and multiple workers, see the basic_redis_example in the pynenc samples repository.
Configuration
Builder Parameters
# URL-based (recommended)
app = (
PynencBuilder()
.app_id("my_app")
.redis(url="redis://localhost:6379/0")
.multi_thread_runner(min_threads=2, max_threads=8)
.build()
)
# Database number only (uses host/port from env or defaults)
app = (
PynencBuilder()
.app_id("my_app")
.redis(db=1)
.process_runner()
.build()
)
Component-Specific Configuration
app = (
PynencBuilder()
.app_id("my_app")
.redis(url="redis://localhost:6379")
.redis_client_data_store(
min_size_to_cache=1024, # cache arguments > 1KB
local_cache_size=1000, # local LRU cache entries
)
.redis_trigger(
scheduler_interval_seconds=60,
enable_scheduler=True,
)
.build()
)
Environment Variables
PYNENC__REDIS__REDIS_URL="redis://localhost:6379/0"
# Or individual parameters:
PYNENC__REDIS__REDIS_HOST="localhost"
PYNENC__REDIS__REDIS_PORT=6379
PYNENC__REDIS__REDIS_DB=0
Connection URLs
.redis(url="redis://localhost:6379/0") # Standard
.redis(url="redis://:password@localhost:6379/0") # With password
.redis(url="rediss://localhost:6380/0") # SSL/TLS
Requirements
- Python >= 3.12
- Pynenc >= 0.3.0
- redis >= 4.6.0
- A running Redis server
Related Plugins
- pynenc-mongodb: Full-stack MongoDB backend
- pynenc-rabbitmq: RabbitMQ broker (pairs with Redis for state/orchestrator/triggers)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for pynenc-redis 0.3.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 | |
|---|---|---|---|
| pynenc_redis-0.3.0.tar.gz | 435.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pynenc_redis-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 476.3 kB
Release files / pynenc_redis-0.3.0.tar.gz
| Download URL | pynenc_redis-0.3.0.tar.gz |
|---|---|
| Size | 435.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd6b24c2c0981a649376652a0ad8493e15b358cd9a0b38ce414eb512a3867387
|
|
BLAKE2b-256 checksum How to use checksums |
c93f261694aed3a4a3a2de6c3ffc16923528271dffbfdd7ed23f095b7a24afea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pynenc_redis-0.3.0-py3-none-any.whl
| Download URL | pynenc_redis-0.3.0-py3-none-any.whl |
|---|---|
| Size | 40.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca41ac57955470b85acf055c605ba5321686f5454fe1f53910b2ed30520b838b
|
|
BLAKE2b-256 checksum How to use checksums |
d62a6f37f85491a6fd98081d57e95dd94bfe30b2cd95e8114584c7deb389820d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|