render-lab-tasks-core
Shared mechanisms for Python 3.12+. Version 0.1.1 extends the original 0.1.0 HTTP/polling subset.
pip install render-lab-tasks-core==0.1.1
Registration-free shared HTTP and polling mechanisms. The HTTP/polling surface exposes
HttpClient, ApiError, and is_retryable from .http, plus poll_until and
poll_gate from .poll. No tasks, credentials, or vendor-specific DTOs.
Clients use a caller-owned async HTTPX client. Authentication and base URLs resolve at call time, per-call headers override defaults, empty/malformed JSON maps to None like the TS reference, and every request makes one attempt by default. Polling checks once and throws so the durable task policy schedules the next attempt; it never sleeps.
Version 0.1.1 additionally provides UTF-8 byte budgets from
.bounded and lazy Google access-token refresh from .google_auth. The OAuth
helper accepts either GOOGLE_ACCESS_TOKEN or GOOGLE_CLIENT_ID,
GOOGLE_CLIENT_SECRET, and GOOGLE_REFRESH_TOKEN; it shares concurrent refreshes
and caches tokens for the caller-owned client's lifetime with a 60-second margin.
Default task dependencies live for one operation, so reuse an injected client
when cross-call caching is useful. Failed OAuth responses never echo their body. .http.loads_json rejects
non-finite numbers so Python-specific NaN/Infinity values cannot escape a DTO.
.poll.await_retry(every_ms=..., for_ms=...) returns SDK Retry keyword arguments:
Retry(**await_retry(every_ms=3000, for_ms=10000)). The SDK import belongs to the
caller; core has no Render dependency.
.http.HttpRetryOptions enables bounded retries only when explicitly passed as
HttpClient(..., retry=options). It retries 429/5xx responses, honors Retry-After,
and otherwise uses capped exponential full jitter. Transport errors propagate.
Sleep and randomness are injectable. All pack defaults remain single-attempt.
.signatures provides pure byte comparisons, HMAC encoding, header parsing,
and timestamp-window mechanisms for vendor-owned webhook adapters.
.http.throw_if_not_ok(response, label) preserves HTTP status even when reading
the error body fails. Cancellation is never swallowed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file render_lab_tasks_core-0.1.1.tar.gz.
File metadata
- Download URL: render_lab_tasks_core-0.1.1.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418df8c6d9a682b7788446189b1ee6a43fac25e7c5447b58344778118b155e9b
|
|
| MD5 |
12a94c23f6fdf783c4dff2f2e584d5f2
|
|
| BLAKE2b-256 |
c98bb3713ef82ce18a0c7a3ea5d15feb4dab940ae9972bb454ae78173860a948
|
Provenance
The following attestation bundles were made for render_lab_tasks_core-0.1.1.tar.gz:
Publisher:
publish.yml on render-lab/render-tasks-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
render_lab_tasks_core-0.1.1.tar.gz -
Subject digest:
418df8c6d9a682b7788446189b1ee6a43fac25e7c5447b58344778118b155e9b - Sigstore transparency entry: 2749123767
- Sigstore integration time:
-
Permalink:
render-lab/render-tasks-python@a9ceb42f0f6c577e8b0f775f2342d4ce531e7696 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/render-lab
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9ceb42f0f6c577e8b0f775f2342d4ce531e7696 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file render_lab_tasks_core-0.1.1-py3-none-any.whl.
File metadata
- Download URL: render_lab_tasks_core-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c42545f18e068a961ef0079b57ed518fbbd374cd99516ed7a3ca9a8e8275c1e4
|
|
| MD5 |
f89ec4b1a40eb870a6dc7b6bd15eec98
|
|
| BLAKE2b-256 |
9334a78dff62aacf28427b51b9dd76f157947ef10977bbce75ffad7347328bc6
|
Provenance
The following attestation bundles were made for render_lab_tasks_core-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on render-lab/render-tasks-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
render_lab_tasks_core-0.1.1-py3-none-any.whl -
Subject digest:
c42545f18e068a961ef0079b57ed518fbbd374cd99516ed7a3ca9a8e8275c1e4 - Sigstore transparency entry: 2749123854
- Sigstore integration time:
-
Permalink:
render-lab/render-tasks-python@a9ceb42f0f6c577e8b0f775f2342d4ce531e7696 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/render-lab
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9ceb42f0f6c577e8b0f775f2342d4ce531e7696 -
Trigger Event:
workflow_dispatch
-
Statement type: