File: README.md

package info (click to toggle)
aioaseko 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 172 kB
  • sloc: python: 431; makefile: 6
file content (48 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# aioAseko package 
[![PyPI](https://img.shields.io/pypi/v/aioaseko)](https://pypi.org/project/aioaseko/) ![PyPI - Downloads](https://img.shields.io/pypi/dm/aioaseko) [![PyPI - License](https://img.shields.io/pypi/l/aioaseko?color=blue)](https://github.com/milanmeu/aioaseko/blob/main/COPYING)

An async Python wrapper for the Aseko Pool Live API.

The library supports Aseko ASIN AQUA devices.
The Aseko ASIN Pool is partially supported.
The library is currently limited to a selection of features available on aseko.cloud.


## Installation
```bash
pip install aioaseko
```

## Usage
### Import
```python
from aioaseko import Aseko
```

### Create an `Aseko` instance and login
```python
api = Aseko("aioAseko@example.com", "passw0rd")
await api.login()
```

## Example
```python
from asyncio import run

from aioaseko import Aseko, InvalidCredentials, Unit

async def main():
    api = Aseko("aioAseko@example.com", "passw0rd")
    try:
        await api.login()
    except InvalidCredentials:
        print("The username or password is wrong.")
        return
    units = await api.get_units()
    for unit in units:
        if isinstance(unit, Unit):
            print(f"Unit: {unit.name} ({unit.serial_number})")
            print(f"Air temperature: {unit.air_temperature}")
            print(f"Water flow to probes: {unit.water_flow_to_probes}")
run(main())
```