Skip to main content

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

swisshydrodata-0.3.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swisshydrodata-0.3.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

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

Hashes for swisshydrodata-0.3.1.tar.gz
Algorithm Hash digest
SHA256 d278f15bc08d8236cfb9a105a7df16c8a792acae038d51e65f020becebe0f515
MD5 927a5638e703f2ddfb9dad849b87a1bd
BLAKE2b-256 0a163dca70c57fa6c01d34e057caaf5d6263cedbd8e5aedc1092d087e20ad8ec

See more details on using hashes here.

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

Hashes for swisshydrodata-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c47ad350a2172e6d36604fcdbaf6be3f875022b37c09d27c2aaf14f88ca5e513
MD5 816ce4ca8123666a1e06e803661f1b9b
BLAKE2b-256 a94b6d592678a6d72bb6e1b70fd112681e2c23cd7feb701b6a14922a29518524

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page