A library to fetch data from the Swiss federal Office for Environment FEON
Project description
swisshydrodata
swisshydrodata is a library that allow you to get data from the Swiss Federal Office for the Environment FOEN. To find a station near to you, use the list of stations on the FEON website.
The library uses a REST API which hands out the data because the FEON does not allow to use their data service as backend.
The data update interval is limited to onece every 10 minutes by FEON, so thats how often the API has new data available.
Example
import aiohttp
import asyncio
from swisshydrodata import SwissHydroData
async def main():
async with aiohttp.ClientSession() as session:
shd = SwissHydroData(session)
# returns a list of station numbers
data = await shd.async_get_stations()
print(data)
# returns all data available for station #2143
data = await shd.async_get_station(2143)
print(data)
asyncio.run(main())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swisshydrodata-0.3.1.tar.gz.
File metadata
- Download URL: swisshydrodata-0.3.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d278f15bc08d8236cfb9a105a7df16c8a792acae038d51e65f020becebe0f515
|
|
| MD5 |
927a5638e703f2ddfb9dad849b87a1bd
|
|
| BLAKE2b-256 |
0a163dca70c57fa6c01d34e057caaf5d6263cedbd8e5aedc1092d087e20ad8ec
|
File details
Details for the file swisshydrodata-0.3.1-py3-none-any.whl.
File metadata
- Download URL: swisshydrodata-0.3.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c47ad350a2172e6d36604fcdbaf6be3f875022b37c09d27c2aaf14f88ca5e513
|
|
| MD5 |
816ce4ca8123666a1e06e803661f1b9b
|
|
| BLAKE2b-256 |
a94b6d592678a6d72bb6e1b70fd112681e2c23cd7feb701b6a14922a29518524
|