Skip to content

v0.4.1

Latest

Choose a tag to compare

@dodofarm dodofarm released this 10 Jul 05:54
· 2 commits to master since this release

A reliability release: transient failures are now retried automatically, add timeout control, and session management was tightened up.

Retries for 5xx and transport failures

Requests that fail with a 5xx status, a timeout, or a connection error are now retried up
to max_retries (default 3) with the same exponential backoff already used for 429s.

If the failure persists past max_retries, ServerError, TransportError or MaxRetriesExceededError is raised respectively. Set max_retries=0 to disable retries.

Per-request timeout

New request_timeout config option (default 30 seconds, covering connect + read).
Previously requests could hang for aiohttp's default 5 minutes. If you supply your own
session, its timeout settings are used instead.

config = MassiveApiConfig(
    api_key="YOUR_API_KEY",
    max_retries=3,       # exponential backoff on HTTP 429, 5xx, and transport errors
    request_timeout=30,  # per-request timeout in seconds
)