Metadata-Version: 2.4
Name: switch2
Version: 0.1.0
Summary: Async client library for the Switch2 energy portal
Author-email: Jelmer Vernooij <jelmer@jelmer.uk>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/jelmer/python-switch2
Project-URL: Repository, https://github.com/jelmer/python-switch2
Project-URL: Issues, https://github.com/jelmer/python-switch2/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Home Automation
Classifier: Framework :: AsyncIO
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: aiohttp>=3.8
Requires-Dist: beautifulsoup4>=4.12

# python-switch2

Async Python client library for the [Switch2](https://my.switch2.co.uk) energy portal.

## Installation

```sh
pip install switch2
```

## Usage

```python
import asyncio
from switch2 import Switch2ApiClient

async def main():
    client = Switch2ApiClient("you@example.com", "your-password")
    try:
        data = await client.fetch_data()
        print(f"Customer: {data.customer.name}")
        for reading in data.readings:
            print(f"  {reading.date}: {reading.amount} {reading.unit}")
        for bill in data.bills:
            print(f"  {bill.date}: £{bill.amount}")
    finally:
        await client.close()

asyncio.run(main())
```

## License

Apache-2.0
