Skip to main content

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

render_lab_tasks_core-0.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

render_lab_tasks_core-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

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

Hashes for render_lab_tasks_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 418df8c6d9a682b7788446189b1ee6a43fac25e7c5447b58344778118b155e9b
MD5 12a94c23f6fdf783c4dff2f2e584d5f2
BLAKE2b-256 c98bb3713ef82ce18a0c7a3ea5d15feb4dab940ae9972bb454ae78173860a948

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file render_lab_tasks_core-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for render_lab_tasks_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c42545f18e068a961ef0079b57ed518fbbd374cd99516ed7a3ca9a8e8275c1e4
MD5 f89ec4b1a40eb870a6dc7b6bd15eec98
BLAKE2b-256 9334a78dff62aacf28427b51b9dd76f157947ef10977bbce75ffad7347328bc6

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

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