Metadata-Version: 2.5
Name: senec-connect-api
Version: 0.1.0
Summary: Async Python client for the SENEC.Connect cloud API
Project-URL: Repository, https://github.com/MiHechtel/senec-connect-api
Project-URL: Issues, https://github.com/MiHechtel/senec-connect-api/issues
Author: SENEC Connect API contributors
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Requires-Dist: aiohttp>=3.9
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Requires-Dist: ruff>=0.9; extra == 'test'
Description-Content-Type: text/markdown

# senec-connect-api

An asynchronous Python client for SENEC.Connect. The client uses a caller-provided `aiohttp.ClientSession` and returns the API's general system data without translating it into application-specific concepts.

## Usage

```python
import asyncio

from aiohttp import ClientSession
from senec_connect_api import SenecClient


async def main() -> None:
    async with ClientSession() as session:
        client = SenecClient("your-subscription-key", session)
        systems = await client.async_get_device_data()
        print(systems)


asyncio.run(main())
```

The caller owns the session lifecycle. `SenecAuthError` identifies rejected credentials, `SenecConnectionError` indicates a network failure, and `SenecApiError` indicates an API or response-data error.

## Development

```bash
python -m pip install -e '.[test]'
pytest
ruff check .
ruff format --check .
```

Releases are tagged with the same version published to PyPI. To publish:

1. Configure a PyPI pending publisher for project `senec-connect-api`, GitHub owner `MiHechtel`, repository `senec-connect-api`, workflow `publish.yaml`, and environment `pypi`.
2. Create the GitHub `pypi` environment.
3. Publish a GitHub release using a `v`-prefixed tag matching the version in `pyproject.toml` (for example, `v0.1.0`).

The release workflow builds the wheel and source distribution, then publishes them through PyPI Trusted Publishing. It needs no PyPI API token.
