> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ev-cloud.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ev-cloud.ai/_mcp/server.

# Python SDK

## Install

```bash
pip install evcloud-sdk
```

The package installs as `evcloud-sdk` and imports as `evcloud_sdk`.

## Create a client

Pass the production API, `https://api.ev-cloud.ai`, as `base_url`.

```python
import os
from evcloud_sdk import EvcloudSDK

client = EvcloudSDK(
    base_url="https://api.ev-cloud.ai",
    token=os.environ["EVCLOUD_TOKEN"],
)
```

For `asyncio`, use `AsyncEvcloudSDK` with the same arguments and `await` each call. See [Authentication](/get-started/authentication) for the token.

## Make a call

Each domain is a namespace: `client.cpo`, `client.emsp`, `client.energy`, `client.webhooks` and `client.ocpi`.

```python title={"quickstart.py"}
import os

from evcloud_sdk import EvcloudSDK

client = EvcloudSDK(
    base_url=os.environ["EVCLOUD_BASE_URL"],  # e.g. https://api.ev-cloud.ai
    token=os.environ["EVCLOUD_TOKEN"],
)

# List methods return a pager that iterates across every page.
for location in client.cpo.locations.list(limit=50):
    print(location.location_id, location.name)

# Cap a charger at 11 kW, then read the charger's answer.
request = client.energy.control_requests.create(
    charge_point_id="CP-AMS-001",
    action="SET_EVSE_INPUT_LIMIT",
    connector_id=0,
    limit=11000,
    unit="W",
)
outcome = client.energy.control_requests.get(request.request_id)
print(outcome.result)

```

Errors, retries and which calls are never resent: [Errors and retries](/sdks/errors-and-retries).