Socket
Socket
Sign inDemoInstall

normetapi

Package Overview
Dependencies
1
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    normetapi

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


Maintainers
1

Readme

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.

Keywords

FAQs


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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc