Skip to main content

Meteostat Python Package

The Meteostat Python library provides a simple API for accessing open weather and climate data. The historical observations and statistics are collected by Meteostat from different public interfaces, most of which are governmental.

Among the data sources are national weather services like the National Oceanic and Atmospheric Administration (NOAA) and Germany's national meteorological service (DWD).

Are you looking for a hosted solution? Try our JSON API.

Installation

The Meteostat Python package is available through PyPI:

pip install meteostat

Meteostat requires Python 3.5 or higher. If you want to visualize data, please install Matplotlib, too.

Documentation

The Meteostat Python library is divided into multiple classes which provide access to the actual data. The documentation covers all aspects of the library:

Example

Let's plot 2018 temperature data for Vancouver, BC:

# Import Meteostat library and dependencies
from datetime import datetime
import matplotlib.pyplot as plt
from meteostat import Point, Daily

# Set time period
start = datetime(2018, 1, 1)
end = datetime(2018, 12, 31)

# Create Point for Vancouver, BC
location = Point(49.2497, -123.1193, 70)

# Get daily data for 2018
data = Daily(location, start, end)
data = data.fetch()

# Plot line chart including average, minimum and maximum temperature
data.plot(y=['tavg', 'tmin', 'tmax'])
plt.show()

Take a look at the expected output:

2018 temperature data for Vancouver, BC

Contributing

Instructions on building and testing the Meteostat Python package can be found in the documentation. More information about the Meteostat bulk data interface is available here.

Donating

If you want to support the project financially, you can make a donation using one of the following services:

Data License

Meteorological data is provided under the terms of the Creative Commons Attribution-NonCommercial 4.0 International Public License (CC BY-NC 4.0). You may build upon the material for any purpose, even commercially. However, you are not allowed to redistribute Meteostat data "as-is" for commercial purposes.

By using the Meteostat Python library you agree to our terms of service. All meteorological data sources used by the Meteostat project are listed here.

Code License

The code of this library is available under the MIT license.

Metadata

Release files for meteostat 1.5.1

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

Source distribution (sdist)

Source distribution for meteostat 1.5.1
File Size Uploaded Provenance
meteostat-1.5.1.tar.gz 15.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for meteostat 1.5.1
File Interpreter ABI Platform
meteostat-1.5.1-py2-none-any.whl Python 2 none any Details

Total release size: 45.4 kB

Release files / meteostat-1.5.1.tar.gz

Download URL meteostat-1.5.1.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0ac2b0ecf36e47a5c73b4a551f99ae4ada067b46e75d19d486a1d8b4f4c6341a
BLAKE2b-256 checksum
How to use checksums
75e60e7f950ae3f81f5d30ef85c2a05bcfa4ba10a04b4a557782b029e3f1aeb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

Release files / meteostat-1.5.1-py2-none-any.whl

Download URL meteostat-1.5.1-py2-none-any.whl
Size 29.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
3c77b3574eb6e901d88660925370a86f9b199d478455b8aeb4751a5c8a1d7ab6
BLAKE2b-256 checksum
How to use checksums
d2e8d44744437bf6eb2592f0ef4aac8e0e9bab6e05b8ae53bcccbd4c718b8565
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

Security for meteostat 1.5.1

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.

Release history Release notifications | RSS feed

This release

1.5.1 This release

2 release files No provenance

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