File: README.md

package info (click to toggle)
python-aioeafm 1.0.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,084 kB
  • sloc: python: 108; sh: 14; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 727 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
# aioeafm

This is a thin wrapper for the [Real Time flood monitoring API](https://environment.data.gov.uk/flood-monitoring/doc/reference).

This wrapper is built for home-assistant. We target the same python versions as home-assistant and follow similar code style guidelines.

```bash
pip install aioeafm
```

You can get a list of monitoring stations with:

```python
from aioeafm import get_stations
import aiohttp


async with aiohttp.ClientSession() as session:
    print(await get_stations(session))
```

And you can get the current data for that station with:

```python
from aioeafm import get_station
import aiohttp


async with aiohttp.ClientSession() as session:
    print(await get_station(session, "1491TH"))
```