# Clients (https://nolantw.github.io/cwa/en/reference/clients/)

## `CWA`

```python
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`

```python
def close() -> None
```

Close the client and release its HTTP resources.

## `AsyncCWA`

```python
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`

```python
async def aclose() -> None
```

Close the client and release its HTTP resources.