Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Readme
Python library to read 10 min weather data from GeoSphere Austria former ZAMG
This package allows you to read the weather data from weather stations of GeoSphere Austria weather service. GeoSphere Austria joins Zentralanstalt für Meteorologie und Geodynamik (ZAMG) and the Geologische Bundesanstalt (GBA) since 1st January 2023.
pip install zamg
Simple usage example to fetch specific data from the closest station.
"""Asynchronous Python client for GeoSphere Austria weather data."""
import asyncio
import src.zamg.zamg
from src.zamg.exceptions import ZamgError
async def main():
"""Sample of getting data"""
try:
async with src.zamg.zamg.ZamgData() as zamg:
# option to disable verify of ssl check
zamg.verify_ssl = False
# trying to read zamg station id of the closest station
data = await zamg.closest_station(46.99, 15.499)
# set closest station as default one to read
zamg.set_default_station(data)
print("closest_station = " + str(zamg.get_station_name) + " / " + str(data))
# print list with all possible parameters
print(f"Possible station parameters: {zamg.get_all_parameters()}")
# set parameters directly
zamg.station_parameters = "TL,SO"
# or set parameters as list
zamg.set_parameters(("TL", "SO"))
# if none of the above parameters are set, all possible parameters are read
# do an update
await zamg.update()
print(f"---------- Weather for station {zamg.get_station_name} ({data})")
for param in zamg.get_parameters():
print(
str(param)
+ " -> "
+ str(zamg.get_data(parameter=param, data_type="name"))
+ " -> "
+ str(zamg.get_data(parameter=param))
+ " "
+ str(zamg.get_data(parameter=param, data_type="unit"))
)
print("last update: %s", zamg.last_update)
except (ZamgError) as exc:
print(exc)
if __name__ == "__main__":
asyncio.run(main())
If you want to contribute to this please read the Contribution guidelines
Code template to read dataset API was mainly taken from @LuisTheOne's zamg-api-cli-client
FAQs
Asynchronous Python client for GeoSphere Austria (ZAMG) weather data.
We found that zamg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).