Skip to main content

SolarEdge Client (Monitoring API)

UV Ruff prek

PyPI Version Supported Python versions License

A Python client for the SolarEdge Monitoring API, providing both synchronous and asynchronous interfaces for accessing solar energy data.

See https://www.solaredge.com/sites/default/files/se_monitoring_api.pdf

Table of Contents

Features

  • Sync & Async Support: Choose between MonitoringClient (sync) and AsyncMonitoringClient (async)
  • Current API Coverage: Every monitoring endpoint SolarEdge still serves
  • Type Hints: Complete type annotations for better IDE support
  • Rate Limiting: Built-in awareness of API limits (3 concurrent requests)
  • Context Manager Support: Automatic resource cleanup

Installation

pip install solaredge
poetry add solaredge
uv add solaredge

Quick Start

Synchronous Usage

from solaredge import MonitoringClient

# Basic usage
client = MonitoringClient(api_key="YOUR_API_KEY")
sites = client.get_site_list()
client.close()

# Context manager (recommended)
with MonitoringClient("YOUR_API_KEY") as client:
    site_details = []
    sites = client.get_site_list()
    for site in sites["sites"]["list"]:
        site_details.append(
            client.get_site_details(
                site_id=site["id"],
            )
        )

Asynchronous Usage

import asyncio
from solaredge import AsyncMonitoringClient


async def main():
    async with AsyncMonitoringClient(api_key="YOUR_API_KEY") as client:
        sites = await client.get_site_list()

        # Concurrent requests (respecting 3 concurrent limit)
        tasks = []
        for site in sites["sites"]["list"]:
            task = client.get_site_details(site_id=site["id"])
            tasks.append(task)

        site_details = await asyncio.gather(*tasks)


asyncio.run(main())

Error Handling

Every failure raises a SolarEdgeError subclass, so you never need to import httpx to handle one. The originating httpx exception is preserved as __cause__ if you want the transport-level detail.

from solaredge import (
    MonitoringClient,
    SolarEdgeAuthError,
    SolarEdgeRateLimitError,
    SolarEdgeError,
)

with MonitoringClient("YOUR_API_KEY") as client:
    try:
        sites = client.get_site_list()
    except SolarEdgeAuthError:
        ...  # bad or unauthorized API key
    except SolarEdgeRateLimitError as exc:
        ...  # exc.status_code, exc.response_body
    except SolarEdgeError:
        ...  # anything else this library raises

The hierarchy:

Exception Raised when
SolarEdgeError Base class for everything below
SolarEdgeValidationError Arguments rejected locally, before any request. Also a ValueError
SolarEdgeAPIError The API returned an error status
SolarEdgeAuthError 401 / 403 — key missing, invalid or not permitted
SolarEdgeNotFoundError 404 — no such site, equipment or endpoint
SolarEdgeRateLimitError 429 — quota or concurrency limit exceeded
SolarEdgeServerError 5xx — the API failed to handle a valid request
SolarEdgeResponseError Success status, but the body could not be parsed

SolarEdgeAPIError and its subclasses carry status_code, response_body and url.

Note on API keys in URLs. SolarEdge authenticates via an api_key query parameter, so the key appears in every request URL. This library redacts it from exception messages, but it will still be present in anything else that records raw URLs — proxy logs, HTTP debug output, httpx event hooks. Take care before sharing those.

Rate Limiting & Best Practices

  • Daily limit: 300 requests per API Key and per site ID
  • Concurrency: Maximum 3 concurrent requests from same IP
  • Bulk operations: Up to 100 site IDs per bulk request

for more information see page 8 of the api documentation

Development

# Install development dependencies
uv sync
uv run prek install -t commit-msg
# Commiting changes
uv run cz c

API Documentation

For detailed API documentation including all parameters and response formats, see:

Release files for solaredge 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solaredge 2.0.0
File Size Uploaded
solaredge-2.0.0.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solaredge 2.0.0
File Interpreter ABI Platform
solaredge-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / solaredge-2.0.0.tar.gz

Download URL solaredge-2.0.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9dba5ee73f0592ea4ed29dc6d0c9df2bafa7fc7305ff0362ba95867e4412927c
BLAKE2b-256 checksum
How to use checksums
e25a8ea0b43dbe7e11b714563ad62d4b20f77c02231feadf119c4c805c305a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / solaredge-2.0.0-py3-none-any.whl

Download URL solaredge-2.0.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3b67fb791bdb9c8de7e0e56c0b00f73fe6cb441a3aa3960cb12e9f53a3e61df
BLAKE2b-256 checksum
How to use checksums
5d2e3ca1ac052d909c277f62b50a4f5d6420303b39fbc1049e977ee7cddf9aaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page