Skip to main content

Pynenc

Pynenc Redis Plugin

Full-stack Redis backend for Pynenc distributed task orchestration

Package version Supported Python versions GitHub last commit GitHub license


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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Download files

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

Source Distribution

pynenc_redis-0.3.0.tar.gz (435.5 kB view details)

Uploaded Source

Built Distribution

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

pynenc_redis-0.3.0-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file pynenc_redis-0.3.0.tar.gz.

File metadata

  • Download URL: pynenc_redis-0.3.0.tar.gz
  • Upload date:
  • Size: 435.5 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for pynenc_redis-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cd6b24c2c0981a649376652a0ad8493e15b358cd9a0b38ce414eb512a3867387
MD5 9183134ce45c5c160679910b8a74ba8e
BLAKE2b-256 c93f261694aed3a4a3a2de6c3ffc16923528271dffbfdd7ed23f095b7a24afea

See more details on using hashes here.

File details

Details for the file pynenc_redis-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pynenc_redis-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for pynenc_redis-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca41ac57955470b85acf055c605ba5321686f5454fe1f53910b2ed30520b838b
MD5 6b349319a710da1f45c5aa29c823a890
BLAKE2b-256 d62a6f37f85491a6fd98081d57e95dd94bfe30b2cd95e8114584c7deb389820d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page