Skip to content

Utils

from_iso_string(timestamp)

Convert ISO8601 string to datetime object.


to_rfc3339_string(dt)

Convert datetime to RFC3339 string format for Twitch API.


normalize_timezone(dt)

Normalize datetime to have timezone information.


json_or_text(response) async

Return parsed JSON if possible, otherwise return plain text.


setup_logging(handler=None, level=None, root=True)

Setup logging configuration.


parse_mock_urls(input_url)

Parse input URL and return HTTP and WebSocket mock URLs.


ExponentialBackoff

Handles retry intervals with exponential backoff.

get_delay()

Determine the delay before the next retry attempt.