Retrieve weather data from Yr (by the Norwegian Meteorogical Institute) easily.
Project description
yr-weather
Retrieve weather data from Yr (by the Norwegian Meteorogical Institute) easily.
yr-weather
is an API wrapper for some of the products from Yr's API.
Available on PyPI:
Supported products are:
- Locationforecast (v2.0)
- Radar (v2.0)
- Textforecast (v2.0)
- Sunrise (v2.0)
- Geosatellite (v1.4)
Installing
To use yr-weather
, simply install it using pip
.
For Windows:
pip install yr-weather
For Linux/macOS:
python3 -m pip install yr-weather
Getting started
To get started, check out the documentation.
For specific API Products, check their separate section on the documentation:
For the best developer experience, all functions and classes are typed and documented with docstrings.
Caching
By default, the library makes a cache file named yr_cache.sqlite
in the working directory.
To disable caching, set use_cache
to False
like so:
yr_weather.Locationforecast(headers=headers, use_cache=False)
MET's Terms of Service encourage using caching, to avoid extra load on the network. Therefore, this feature is not recommended.
Future objectives (TODOs)
- Add Read the Docs documentation
- Add further features from MET's API
- Improve support for earlier Python versions
License
This project is licensed under the Apache License 2.0.
Disclaimer
yr-weather
is not associated with yr.no or the Norwegian Meteorological Institute (MET).
Any usage of the APIs provided by MET must follow their API Terms of Service.
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
Hashes for yr_weather-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799945faa230daef2555b4ce5c5380b25c54d1cc605a1c8a076730cd4f7fbe77 |
|
MD5 | 8ee3c77bee406bc33d4ab1bb8b70e71c |
|
BLAKE2b-256 | 80ef2401a7c90aa015253c6bc262a9a31210cb1091a3f7fa70904724f15c2538 |