Metadata-Version: 2.4
Name: ampere-iq
Version: 0.1.0
Summary: Python client library for the Ampere.IQ energy management system by Energiekonzepte Deutschland
Home-page: https://github.com/yourusername/ampere
Author: Pascal Greilach
Author-email: pascal@greilach.dev
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Home Automation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Ampere

A Python client library for fetching data from the Ampere.IQ energy management system by Energiekonzepte Deutschland.

> **Note:** This library was generated with AI assistance but designed and reviewed by a human.

## Installation

```bash
pip install -e .
```

Or install from requirements:

```bash
pip install -r requirements.txt
```

## Usage

```python
from ampere import AmpereClient

# Initialize the client with your Ampere.IQ system URL
client = AmpereClient('https://your-ampere-system.local')

# Authenticate
client.login('your-password')

# Fetch energy overview data
overview = client.energy_overview()
print(overview.production)
print(overview.consumption)
```

## API Reference

### `AmpereClient(base_url)`

Initialize a new Ampere.IQ API client.

**Parameters:**
- `base_url` (str): Base URL of your Ampere.IQ system

### Methods

#### `login(password)`
Authenticate with the Ampere.IQ system.

**Parameters:**
- `password` (str): The installer password

**Raises:**
- `requests.exceptions.HTTPError`: If authentication fails

#### `energy_overview()`
Fetch current energy overview data from the system.

**Returns:**
- `SimpleNamespace`: Energy data with attribute access (e.g., `production`, `consumption`)

**Raises:**
- `requests.exceptions.RequestException`: If the request fails

## License

MIT
