Skip to main content

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 raises ValueError if 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 or None.

Sensor

  • Represents a single sensor reading with type, unit, value, and date.
  • parsed_datetime: computed datetime parsed from the raw date string.
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_data_bz_meteo-1.0.0a2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

open_data_bz_meteo-1.0.0a2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for open_data_bz_meteo-1.0.0a2.tar.gz
Algorithm Hash digest
SHA256 1897e1f328eedf73a3709ed63804f49b839fb432927e83065a7c1f97671fee84
MD5 6b751cb772a78c0e0dd03437577ca352
BLAKE2b-256 e93d03c558457d29c31c744b42ebca2a11a22641e76d3105f51fdbd68d5f1ac8

See more details on using hashes here.

File details

Details for the file open_data_bz_meteo-1.0.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for open_data_bz_meteo-1.0.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 8311d9658bf5d308bbdc525b24c76706df24bf0f8400d7a5e69a38d369200878
MD5 3442ae04b316f176c9b5a690434f0ad3
BLAKE2b-256 80cf2eb0d341f597d11a2f92cf8cbfc3bb81cbf1845a46ce43479deeb831330c

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