> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dalyenergy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Overview

> Comprehensive overview of DalySDK architecture, behavior, and coverage

# SDK Overview

DalySDK is a synchronous Python client (`daly-energy` on PyPI) for DalyAPI.

## Design Goals

* Simple resource namespaces (`client.projects`, `client.energy_models`, etc.)
* Automatic JWT handling from workspace/user API keys
* Typed, SDK-specific exception hierarchy
* Minimal runtime surface (`httpx` + standard Python dict payloads)

## Installation

```bash theme={null}
pip install daly-energy
```

## Client Construction

```python theme={null}
from dalysdk import DalyClient

client = DalyClient(
    workspace_api_key="wk_...",
    user_api_key="uk_...",
    timeout=30.0,  # optional
)
```

Context manager usage is supported and recommended:

```python theme={null}
with DalyClient(workspace_api_key="wk_...", user_api_key="uk_...") as client:
    projects = client.projects.list()
```

## Architecture

* `AuthManager` exchanges API keys at `POST /auth/token`
* `DalyClient._request()` attaches bearer token and handles retries/errors
* Resource namespaces map to endpoint groups
* Methods return parsed JSON as `dict` / `list[dict]`

## Namespaces Included

* `locations`
* `weather_data`
* `modules`
* `inverters`
* `projects`
* `energy_models`
* `shading_scenes`
* `tasks`
* `workflows`
* `workspaces`

## Utilities

* `BatchRunner` — client-side orchestration for submitting and polling many energy models in a single batch. See [Batch Runner](/sdk/batch-runner).

## What the SDK Does Not Do

* It does not return runtime Pydantic model objects.
* It does not include async client APIs.
* It does not currently expose every DalyAPI route namespace (for example auth/admin/chat utilities) as top-level resource classes.

## Next Pages

* [SDK Authentication Lifecycle](/sdk/authentication)
* [SDK Resource Coverage](/sdk/resources)
* [SDK Errors and Retry Semantics](/sdk/errors)
* [SDK Usage Patterns](/sdk/examples)
