Skip to main content

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

Client Construction

Context manager usage is supported and recommended:

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.

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