Skip to main content

Python interface to the Met Office's Datapoint API

Project description

Datapoint for Python

A Python module for accessing weather data via the Met Office’s open data API known as `Datapoint`.

Disclaimer: This module is in no way part of the datapoint project/service. This module is intended to simplify the use of Datapoint for small Python projects (e.g school projects). No support for this module is provided by the Met Office and may break as the Datapoint service grows/evolves. The author will make reasonable efforts to keep it up to date and fully featured.

Changelog

  • Explicitly state the use of semantic versioning in README.md.

  • Add elements() function to Timestep.

  • Remove night/day indication from weather codes which have them.

  • Change the logic used to calculate the closest timestep to a datetime. The closest timestep to the datetime is now used. Add a new function, Forecast.at_datetime(target) to do this. Forecast.now() has been changed to use this new function. The old behaviour is deprecated and available using Forecast.now_old(). Forecast.future() has been changed to use this new function. The old behaviour is deprecated and available using Forecast.future_old().

  • Check if keys are returned from datapoint api in Manager.py. Do not attempt to read the values from the dict if they are not there.

Installation

$ pip install datapoint

You will also require a Datapoint API key from http://www.metoffice.gov.uk/datapoint/API.

Features

  • List forecast sites

  • Get nearest forecast site from latitiude and longitude

  • Get the following 5 day forecast types for any site

  • Daily (Two timesteps, midday and midnight UTC)

  • 3 hourly (Eight timesteps, every 3 hours starting at midnight UTC)

  • Get observation sites

  • Get observations for any site

Contributing changes

Please feel free to submit issues and pull requests.

License

GPLv3.

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

datapoint-0.9.9.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

datapoint-0.9.9-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file datapoint-0.9.9.tar.gz.

File metadata

  • Download URL: datapoint-0.9.9.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for datapoint-0.9.9.tar.gz
Algorithm Hash digest
SHA256 c7c9594e49aaa8e511cd67876976d9ad805c4ae4a8b60b38770b76792f45b12b
MD5 d673badfc61a1f2124a76f02e423aff2
BLAKE2b-256 4ec7ba96b60aa3fa5af28650104468b6dcb9b07bac6b06066cad074e0ae8923c

See more details on using hashes here.

Provenance

File details

Details for the file datapoint-0.9.9-py3-none-any.whl.

File metadata

  • Download URL: datapoint-0.9.9-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for datapoint-0.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e3802a3d0b3251c5da449b1d8e005dfb99eeee34f9ad997605cfa02138a45f02
MD5 0921c332423fd1fa931ce8e08fc5bbb4
BLAKE2b-256 6851e88db2be1234008915a60f0a9e3fca3914002eaef9b915d7a31f2a8d8d57

See more details on using hashes here.

Provenance

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