Background workers
ListedPython job workers with typed jobs, retries with backoff, graceful shutdown, and tests that need no broker.
Profiles
Commands for worker
uvx pytemplate-uv@latest create my-project -h yuxuzi/background-worker@v1.1.0 -p worker -yFully pinned (CI, offline)
uvx pytemplate-uv@latest create my-project -p worker --template gh:yuxuzi/background-worker --template-ref v1.1.0 --template-commit 13e01d66dda6f9c53030430c37d93e5b4ba868f3 --template-digest fdc55d62db9100042b9aa50ec7ea53b67484815bd1867da3d438060c6b2b9dcc -yWhat the hub checked for worker at v1.1.0
render with default answers, Copier unsafe=Falsepassedthe profile's lifecycle commands (uv sync, checks, tests)passedChecked 2026-11-25 with pytemplate-uv==3.6.0. Passing means the default answers worked then; it does not mean other answers or components work, or that the pack is safe.
Security posture, from the profile
No secrets, network access, or services are needed: the demo and the tests use an in-memory queue, and the runtime uses only the standard library. Job payloads are untrusted input; the example handler validates its payload, and the worker does not sandbox handlers. Logs never include payloads, but dead letters keep exception messages, so handlers must not put secrets in them. The checks do not scan dependencies or code for security problems.
Commands for worker-redis
uvx pytemplate-uv@latest create my-project -h yuxuzi/background-worker@v1.1.0 -p worker-redis -yFully pinned (CI, offline)
uvx pytemplate-uv@latest create my-project -p worker-redis --template gh:yuxuzi/background-worker --template-ref v1.1.0 --template-commit 13e01d66dda6f9c53030430c37d93e5b4ba868f3 --template-digest fdc55d62db9100042b9aa50ec7ea53b67484815bd1867da3d438060c6b2b9dcc -yWhat the hub checked for worker-redis at v1.1.0
render with default answers, Copier unsafe=Falsepassedthe profile's lifecycle commands (uv sync, checks, tests)passedChecked 2026-11-25 with pytemplate-uv==3.6.0. Passing means the default answers worked then; it does not mean other answers or components work, or that the pack is safe.
Security posture, from the profile
REDIS_URL may hold a password, which the app reads only from the environment and never logs, prints, or puts in an error message. No secret is stored in the project. Job payloads are untrusted input; the example handler validates its payload, and the worker does not sandbox handlers. Dead letters keep exception messages, so handlers must not put secrets in them. The Redis connection is not checked for TLS: use a rediss:// URL when the network is untrusted. The tests do not contact a real Redis server, and the checks do not scan dependencies or code for security problems.
Versions
| Tag | Checked | With | Commit | Status |
|---|---|---|---|---|
| v1.1.0 | 2026-11-25 | pytemplate-uv==3.6.0 | 13e01d66dda6 | Listed Latest |
| v1.0.0 | not recorded | pytemplate-uv==3.2.0 | 13c7c022638b | Listed |
Yanked versions stay in the index and its JSON, and are excluded from generated commands.
README badge
[](https://yuxuzi.github.io/pytemplate-hub/templates/yuxuzi/background-worker/)