yr-weather
Retrieve weather data from Norwegian Meteorological Institute's APIs easily.
yr-weather is an API wrapper for some of the products from MET's API.
To see an example on how these APIs can be used, take a look at Yr, made by MET and NRK.
Available on PyPI:
Supported products are:
- Locationforecast (v2.0)
- Radar (v2.0)
- Textforecast (v2.0)
- Sunrise (v3.0)
- Geosatellite (v1.4)
Requirements
This package requires Python 3.8 or newer. To download the newest version, visit Python's website.
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, disabling caching and not implementing it yourself is not recommended.
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.
Metadata
Release files for yr-weather 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yr-weather-0.4.0.tar.gz | 22.8 kB | Without provenance | Details for yr-weather-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yr_weather-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for yr_weather-0.4.0-py3-none-any.whl |
Total release size: 47.1 kB
Release files / yr-weather-0.4.0.tar.gz
| Download URL | yr-weather-0.4.0.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8aaa174aab403261b2ce1e56871d01114381cf6c62f7c0ebbad9b7537789881c
|
|
BLAKE2b-256 checksum How to use checksums |
5d5f7dfafea56574258ad26edba4fba93a2bc96d3ee8943f6a24cd715fda1e4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / yr_weather-0.4.0-py3-none-any.whl
| Download URL | yr_weather-0.4.0-py3-none-any.whl |
|---|---|
| Size | 24.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
992c122a4b1e36bd03b3ec391291866cb1ffb24edca0106fe861fee820610137
|
|
BLAKE2b-256 checksum How to use checksums |
4dcc29f9e586777d7e68ff2becc6137e7496ee4ced7ea792e3431787475e4885
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for yr-weather 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.