render-lab-triggers
Registration-free HTTP, webhook, and cron dispatch to a separate Render Workflow.
from render_lab_triggers import create_dispatch_server
app = create_dispatch_server()
# uvicorn main:app --host 0.0.0.0 --port 3000
GET /healthz returns ok. POST /tasks/{namespace.task} requires
Authorization: Bearer <DISPATCH_TOKEN> and accepts JSON positional arguments
(an array), a single JSON value, or an empty body ([{}]). It returns HTTP 202
with runId. Add ?wait=1 for a bounded wait: HTTP 200 with status/results on
completion or HTTP 202 when the wait expires. The default wait is 25 seconds.
create_dispatch_server accepts workflow_slug, token, dispatcher,
webhooks, wait_timeout_ms, and max_body_bytes. Bodies are capped at 1 MiB
by counting streamed bytes, regardless of Content-Length. Oversized bodies
return 413 before signature verification. The ASGI server owns connection cleanup.
Vendor adapters live in render_lab_tasks_<vendor>.webhooks; mount them in the
webhooks mapping at /webhooks/{name}. Their verify function sees the exact
raw UTF-8 body and lowercase headers before JSON parsing. map returns a
{"task": ..., "args": [...]} dispatch or None to acknowledge and ignore.
As in the pinned TS server, webhook bodies must be JSON. Twilio form-encoded
signatures can be verified with its standalone adapter, but form dispatch needs
a custom endpoint that decodes the form after verification.
from render_lab_triggers import run_cron
# In an async cron entry point:
# result = await run_cron(task="report.daily", args=[{}])
run_cron defaults to asynchronous dispatch. wait=True waits at most five
minutes; wait_timeout_ms overrides it. render_dispatcher(slug=...) starts via
the pinned Render SDK and consumes its public SSE event iterator. It closes
streams on completion, timeout, and cancellation, without adding retries.
client= injects a RenderAsync-compatible client; the caller owns that client.
serve_dispatch_server(port=..., **options) runs Uvicorn until shutdown.
Environment
WORKFLOW_SLUG: target Workflow slug, unless provided explicitly.DISPATCH_TOKEN: bearer token for/tasks/*; unset rejects all such requests.RENDER_API_KEY: Render SDK credential, read when dispatching.CRON_TASK: default cron task name.CRON_INPUT: JSON cron input; an array is positional arguments.PORT: serving port, default 3000.
Imports never read credentials or register tasks. Tests inject dispatchers and SDK event streams; live cross-service dispatch remains in the testing backlog.
Installation
pip install render-lab-triggers==0.1.0
Metadata
Release files for render-lab-triggers 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| render_lab_triggers-0.1.0.tar.gz | 8.3 kB | With provenance | Details for render_lab_triggers-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| render_lab_triggers-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for render_lab_triggers-0.1.0-py3-none-any.whl |
Total release size: 17.2 kB
Release files / render_lab_triggers-0.1.0.tar.gz
| Download URL | render_lab_triggers-0.1.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31a1c5c5f7da7d4f0dbd655648ccfb8d895b63a1aa0c4107016d42420e121ae5
|
|
BLAKE2b-256 checksum How to use checksums |
31fc70212af3e99b9f2653170afc5a956846169be93e2fdf79e0184bf9857807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / render_lab_triggers-0.1.0-py3-none-any.whl
| Download URL | render_lab_triggers-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8647d6a5386d2c637456738142ddada6a3e08f05e98aa4f5462402c08b30d1d
|
|
BLAKE2b-256 checksum How to use checksums |
1d86edc112b02324ecea5f8cb997d73286dd2ef404f3e5db94a285286a28ca10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logSecurity for render-lab-triggers 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for render_lab_triggers-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.