Metadata-Version: 2.4
Name: pykostal
Version: 0.0.4
Summary: package to communicate with Kostal Piko inverters
Author-email: Andreas Rehn <rehn.andreas86@gmail.com>, David Scheidt <scheidt.dav@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/DAMEK86/pykostal
Project-URL: Repository, https://github.com/DAMEK86/pykostal
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Home Automation
Classifier: Topic :: Software Development :: Libraries
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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: Framework :: AsyncIO
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: async_timeout>=4.0.0
Requires-Dist: aiohttp>=3.6.2
Provides-Extra: dev
Requires-Dist: pytest>=3.7; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: tox; extra == "dev"
Dynamic: license-file

# pykostal - a python based kostal bridge

[![PyPI version](https://badge.fury.io/py/pykostal.svg)](https://pypi.org/project/pykostal/)
[![PyPI - Status](https://img.shields.io/pypi/status/pykostal.svg)](https://pypi.org/project/pykostal/)
[![Tests](https://github.com/DAMEK86/pykostal/actions/workflows/test.yml/badge.svg)](https://github.com/DAMEK86/pykostal/actions/workflows/test.yml)

**Python 3.9+ compatible** - Tested on Python 3.9, 3.10, 3.11, 3.12, and 3.13.

Python module for [Kostal](https://www.kostal-solar-electric.com/) piko inverters supporting:

- current-values
  - analog-inputs
  - battery
  - grid
  - home
  - pv-generator
  - s0-in
- home
- info.versions
- statistics
  - day
  - log-data
  - total

not supported:

- all settings
- events

ongoing:

- response code mapping (e.g. status code)

## Installation

Run the following to install:

```python
pip install pykostal
```

## Usage

```python
import kostal

# create instance
inverter = kostal.Piko(aiohttp.ClientSession(), url)
```

## Developing pykostal

### Prerequisites
- Python 3.9 or higher (tested up to Python 3.13)

### Initial setup
Run the following in your virtual environment:

```bash
python -m build
```

### Development installation
Every time you update the project, run the following in your virtual environment:

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

To install pykostal along with the tools you need to develop and run tests, run the following in your virtual environment:

```bash
pip install -e '.[dev]'
```

### Running tests
```bash
pytest
```

### Testing across Python versions
```bash
tox
```

## Publishing

### Modern approach (recommended)
```bash
python -m build
twine upload dist/*
```

### Legacy approach
```bash
python setup.py bdist_wheel sdist
twine upload dist/*
```
