Skip to main content

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

Project description

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.

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

normetapi-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

normetapi-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file normetapi-0.1.0.tar.gz.

File metadata

  • Download URL: normetapi-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for normetapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67aa27b120f45c290d6fc680917b64adfb71162bbf6f6a13e6eba92bddb24df1
MD5 887069823da0a7c1cb92d0f7525c3f96
BLAKE2b-256 21896016269c2bb85c22a9b5480bfec9e4b673aa77a81da3f6c50b24b12762c7

See more details on using hashes here.

File details

Details for the file normetapi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: normetapi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for normetapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf027a41afe5428346ddea19ab29f0114e5bc6d06b189d5f4811cca5753d81d8
MD5 f2613af109b7e074cd036b6192208dda
BLAKE2b-256 f6d378e8a524dc542156a69a00b8e8c8ac6992294254b493a4518080270e405a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page