Python API client for the open meteo data V1 service, provided by Provincia autonoma di Bolzano - Informatica Alto Adige SPA.
Project description
Open Data BZ Meteo - API Client
Python API client for the "Open Meteo Data V1" service, provided by Provincia autonoma di Bolzano - Informatica Alto Adige SPA. The API documentation can be found here.
Core classes
Client
Main entrypoint to the API.
get_stations()fetches all stations and caches them on the client.get_station(station_code)looks up a single station by code (refreshes cache).get_sensors(station)fetches sensors for a given station.get_sensor(station, sensor_type)fetches a single sensor and raisesValueErrorif not found.
Station
- Represents a station with location data (
latitude,longitude,altitude) and localized names (name_deu,name_eng,name_ita,name_lld). sensor_types: sensor types available at this station.get_sensor(sensor_type): returns the first matching sensor orNone.
Sensor
- Represents a single sensor reading with
type,unit,value, anddate. parsed_datetime: computeddatetimeparsed from the rawdatestring.- Localized description (
description_deu,description_ita,description_lld).
Usage
from open_data_bz_meteo import Client
client = Client(timeout=5)
# List available stations
stations = client.get_stations()
print(stations[0].name_eng, stations[0].latitude)
# Fetch sensors for a single station
station = stations[0]
station.sensors = client.get_sensors(station)
print([s.type for s in station.sensors])
# Fetch a single sensor by type
sensor = client.get_sensor(station, "WT")
print(sensor.value, sensor.unit)
Project details
Release history Release notifications | RSS feed
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 open_data_bz_meteo-1.0.0a2.tar.gz.
File metadata
- Download URL: open_data_bz_meteo-1.0.0a2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1897e1f328eedf73a3709ed63804f49b839fb432927e83065a7c1f97671fee84
|
|
| MD5 |
6b751cb772a78c0e0dd03437577ca352
|
|
| BLAKE2b-256 |
e93d03c558457d29c31c744b42ebca2a11a22641e76d3105f51fdbd68d5f1ac8
|
File details
Details for the file open_data_bz_meteo-1.0.0a2-py3-none-any.whl.
File metadata
- Download URL: open_data_bz_meteo-1.0.0a2-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8311d9658bf5d308bbdc525b24c76706df24bf0f8400d7a5e69a38d369200878
|
|
| MD5 |
3442ae04b316f176c9b5a690434f0ad3
|
|
| BLAKE2b-256 |
80cf2eb0d341f597d11a2f92cf8cbfc3bb81cbf1845a46ce43479deeb831330c
|