Skip to main content
Write operations use ModusManagement (Management section).

Modus

Bases: object Synchronous Modus API client. Instantiate once and reuse across your script or application. The client is thread-safe for concurrent GET requests.
  • Parameters:
    • api_key – Your Modus API key. If omitted, reads from the MODUS_API_KEY environment variable.
    • base_url – API origin without a path suffix (default https://api.getmodus.com).
    • timeout – Request timeout as seconds or httpx.Timeout. Default is 5s connect and 300s read.
    • max_retries – Number of automatic retries on 429/5xx (default 2).

close()

Close the underlying HTTP connection pool.

AsyncModus

Bases: object Asynchronous Modus API client.
  • Parameters:
    • api_key – Your Modus API key. If omitted, reads from MODUS_API_KEY.
    • base_url – API origin without a path suffix (default https://api.getmodus.com).
    • timeout – Request timeout as seconds or httpx.Timeout. Default is 5s connect and 300s read.
    • max_retries – Retries on 429/5xx (default 2).

aclose()

Close the underlying async HTTP connection pool.