Skip to main content

normetapi

A small Python library for interacting with the MET Norway Weather API.

Installation

pip install normetapi

Examples

Getting a forecast for a specified location:

from normetapi import location_forecast

# Get forecast for Trondheim:
forecast = location_forecast(63.4107, 10.4538)
print(forecast)

The forecast will be returned as a dictionary. See the description of locationforecast and the data model in the MET Norway Weather API description.

Getting the immediate forecast for a specified location:

from normetapi import nowcast

# Get nowcast for Trondheim:
forecast = nowcast(63.4107, 10.4538, altitude=123)
print(forecast)

The forecast will be returned as a dictionary. See the description of nowcast and the data model in the MET Norway Weather API description.

Getting weather icons:

from normetapi import weathericon

# Get icons:
_, legend = weathericon(output_file='icons.tgz')
print(legend)

This will download weather icons as a gzipped tar archive and return legends as a dictionary. See the description of weathericon in the MET Norway Weather API description.

Terms of service

Please read the terms of service. In particular, to quote the terms of service:

All requests must (if possible) include an identifying User Agent-string (UA) in the request with the application/domain name, optionally version number.

Please modify the USER_AGENT variable in api.py to fit your intended use.

Metadata

Release files for normetapi 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for normetapi 0.1.0
File Size Uploaded Provenance
normetapi-0.1.0.tar.gz 5.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for normetapi 0.1.0
File Interpreter ABI Platform
normetapi-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / normetapi-0.1.0.tar.gz

Download URL normetapi-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
67aa27b120f45c290d6fc680917b64adfb71162bbf6f6a13e6eba92bddb24df1
BLAKE2b-256 checksum
How to use checksums
21896016269c2bb85c22a9b5480bfec9e4b673aa77a81da3f6c50b24b12762c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2

Release files / normetapi-0.1.0-py3-none-any.whl

Download URL normetapi-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf027a41afe5428346ddea19ab29f0114e5bc6d06b189d5f4811cca5753d81d8
BLAKE2b-256 checksum
How to use checksums
f6d378e8a524dc542156a69a00b8e8c8ac6992294254b493a4518080270e405a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2

Security for normetapi 0.1.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page