API reference
Clients
CWA
CWA(api_key: str | None = None, *, timeout: float | None = None, retries: int = 3, cache: bool | None = None, max_concurrency: int = 8, http_client: httpx2.Client | None = None) Synchronous client for CWA Open Data.
Set CWA_API_KEY or pass api_key. Use with to close the SDK client. Responses are cached in memory per client unless cache is False. A client passed as http_client is neither cached nor closed by the SDK.
CWA.close
def close() -> None Close the client and release its HTTP resources.
AsyncCWA
AsyncCWA(api_key: str | None = None, *, timeout: float | None = None, retries: int = 3, cache: bool | None = None, max_concurrency: int = 8, http_client: httpx2.AsyncClient | None = None) Asynchronous client for CWA Open Data.
Set CWA_API_KEY or pass api_key. Use async with to close the SDK client. Responses are cached in memory per client unless cache is False. A client passed as http_client is neither cached nor closed by the SDK.
AsyncCWA.aclose
async def aclose() -> None Close the client and release its HTTP resources.