Skip to main content

ModusManagement

Bases: object Synchronous Modus management client. Instantiate once and reuse. Thread-safe for concurrent reads.
  • Parameters:
    • api_key – Your Modus API key (requires scopes:write + workflows:write scopes). Falls back to MODUS_API_KEY env var.
    • 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).

close()

Close the underlying HTTP connection pool.

AsyncModusManagement

Bases: object Asynchronous Modus management client.
  • Parameters:
    • api_key – Modus API key with write scopes. Falls back to 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.