A Python client library for forecast model APIs (e.g., Météo-France).
Project description
Easy access to Météo-France weather models and data
Documentation: https://pages.github.com/MAIF/meteole/home
Repository: https://github.com/MAIF/meteole
Overview
Meteole is a Python library designed to simplify accessing weather data from the Météo-France APIs. It provides:
- Automated token management: Simplify authentication with a single
application_id. - Unified model usage: AROME and ARPEGE forecasts with a consistent interface.
- User-friendly parameter handling: Intuitive management of key weather forecasting parameters.
- Seamless data integration: Directly export forecasts as Pandas DataFrames
- Vigilance bulletins: Retrieve real-time weather warnings across France.
Perfect for data scientists, meteorologists, and developers, Meteole helps integrate weather forecasts into projects effortlessly.
Installation
pip install meteole
🕐 Quickstart
Step 1: Obtain an API token or key
Create an account on the Météo-France API portal. Next, subscribe to the desired APIs (Arome, Arpege, etc.). Retrieve the API token (or key) by going to “Mes APIs” and then “Générer token”.
Step 2: Fetch Forecasts from AROME and ARPEGE
Meteole allows you to retrieve forecasts for a wide range of weather indicators. Here's how to get started with AROME and ARPEGE:
| Characteristics | AROME | ARPEGE |
|---|---|---|
| Resolution | 1.3 km | 10 km |
| Update Frequency | Every 3 hours | Every 6 hours |
| Forecast Range | Up to 51 hours | Up to 114 hours |
from meteole import AromeForecast
# Initialize the AROME forecast client
arome_client = AromeForecast(application_id=APPLICATION_ID) # APPLICATION_ID found on portail.meteo-france.Fr
# Check indicators available
print(arome_client.indicators)
# Fetch weather data
df_arome = arome_client.get_coverage(
indicator="V_COMPONENT_OF_WIND_GUST__SPECIFIC_HEIGHT_LEVEL_ABOVE_GROUND", # Optional: if not, you have to fill coverage_id
run="2025-01-10T00:00:00Z", # Optional: forecast start time
interval=None, # Optional: time range for predictions
forecast_horizons=[0, 1, 2], # Optional: prediction times (in hours)
heights=[10], # Optional: height above ground level
pressures=None, # Optional: pressure level
coverage_id=None # Optional: an alternative to indicator/run/interval
)
Note: The coverage_id can be used instead of indicator, run, and interval.
The usage of ARPEGE is identical to AROME, except that you initialize the ArpegeForecast class
Step 3: Explore Parameters and Indicators
Discover Available Indicators
Use the get_capabilities() method to list all available indicators, run times, and intervals:
indicators = arome_client.get_capabilities()
print(indicators)
Fetch Description for a Specific Indicator
Understand the required parameters (forecast_horizons, heights, pressures) for any indicator using get_description():
description = arome_client.get_description(coverage_id)
print(description)
Geographical Coverage
The geographical coverage of forecasts can be customized using the lat and long parameters in the get_coverage method. By default, Meteole retrieves data for the entire metropolitan France.
Fetch Forecasts for Multiple Indicators
The get_combined_coverage method allows you to retrieve weather data for multiple indicators at the same time, streamlining the process of gathering forecasts for different parameters (e.g., temperature, wind speed, etc.). For detailed guidance on using this feature, refer to this tutorial.
Explore detailed examples in the tutorials folder to quickly get started with Meteole.
⚠️ VIGILANCE METEO FRANCE
Meteo France provides nationwide vigilance bulletins, highlighting potential weather risks. These tools allow you to integrate weather warnings into your workflows, helping trigger targeted actions or models.
from meteole import Vigilance
vigi = Vigilance(application_id=APPLICATION_ID)
df_phenomenon, df_timelaps = vigi.get_phenomenon()
bulletin = vigi.get_bulletin()
vigi.get_vignette()
To have more documentation from Meteo-France in Vigilance Bulletin :
Contributing
Contributions are very welcome!
If you see an issue that you'd like to see fixed, the best way to make it happen is to help out by submitting a pull request implementing it.
Refer to the CONTRIBUTING.md file for more details about the workflow, and general hints on how to prepare your pull request. You can also ask for clarifications or guidance in GitHub issues directly.
License
This project is Open Source and available under the Apache 2 License.
🤝 Contributors
The development of Meteole was inspired by the excellent work in the meteofranceapi repository by Antoine Tavant.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meteole-0.1.0b1.tar.gz.
File metadata
- Download URL: meteole-0.1.0b1.tar.gz
- Upload date:
- Size: 29.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb30a3717d28cba41f0103bb48d898afcd474dad31d0436625d478ced4c98e64
|
|
| MD5 |
3cefaf7e47d6c86473d674fc1c211611
|
|
| BLAKE2b-256 |
c0c92452296ff3b7603cdb5fc93438dd6e5831bec38c7c7ecdd11c710e32b06b
|
Provenance
The following attestation bundles were made for meteole-0.1.0b1.tar.gz:
Publisher:
ci-cd.yml on MAIF/meteole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meteole-0.1.0b1.tar.gz -
Subject digest:
cb30a3717d28cba41f0103bb48d898afcd474dad31d0436625d478ced4c98e64 - Sigstore transparency entry: 161369377
- Sigstore integration time:
-
Permalink:
MAIF/meteole@9c04f8893eaacec7f41332e070ab27c673b14f51 -
Branch / Tag:
refs/tags/0.1.0b1 - Owner: https://github.com/MAIF
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@9c04f8893eaacec7f41332e070ab27c673b14f51 -
Trigger Event:
push
-
Statement type:
File details
Details for the file meteole-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: meteole-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f18ea02ebc28744386a985b2b0fadc03a075a9389d710bf0bfaac2ba4cff4c5c
|
|
| MD5 |
fcc981e2a7af67e7e772f89d4ac7ca7d
|
|
| BLAKE2b-256 |
4179bcee24543696846c36e65ec75c40b4d4c79af621cc8740a4e4a246a83a52
|
Provenance
The following attestation bundles were made for meteole-0.1.0b1-py3-none-any.whl:
Publisher:
ci-cd.yml on MAIF/meteole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meteole-0.1.0b1-py3-none-any.whl -
Subject digest:
f18ea02ebc28744386a985b2b0fadc03a075a9389d710bf0bfaac2ba4cff4c5c - Sigstore transparency entry: 161369378
- Sigstore integration time:
-
Permalink:
MAIF/meteole@9c04f8893eaacec7f41332e070ab27c673b14f51 -
Branch / Tag:
refs/tags/0.1.0b1 - Owner: https://github.com/MAIF
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@9c04f8893eaacec7f41332e070ab27c673b14f51 -
Trigger Event:
push
-
Statement type: