Skip to content

Meteo-API/meteociel_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Météociel API

Documentation Status License Upload Python Package PyPi Code style: black

Description

Météociel API is a small Python API for the website Météociel. This API allows to dump data from:

  • all the stations known by Météociel (all around the world)

  • upper air sounding (observations) (Western Europe only)

  • upper air sounding (simulated by AROME) (France only)

  • forecasts (mainly GFS, but others models are available)

A full documentation is available on ReadTheDocs.

Installation

You can install this package from PyPI: pip install meteociel-api.

You can install also install it from sources in a virtual environment by executing these commands in a terminal:

$ git clone https://github.com/Meteo-API/meteociel_api.git
$ cd meteociel_api
$ python -m venv venv
$ source venv/bin/activate
$ pip install -e .

Under windows please enter $ venv\Scripts\activate instead of $ source venv/bin/activate.

Basic use

The installation provides two API for Météociel:

  • a first one in the terminal (CLI)

  • a second one as a Python package

To use the CLI, you should start by creating a database for cities by entering: meteociel generate-database. Once this step is done, you're free to run commands to dump data from Météociel. Help can be display by running: meteociel --help or meteociel [COMMAND NAME] --help.

In Python script, you have to start by creating the database too:

from meteociel.cities import generate_database
generate_database()

Then you are free to dump data with the modules: meteociel.stations and meteociel.soundings.

Compiling documentation

The compiled documentation can be found on ReadTheDocs.

You can also locally compile the documentation. You should have make installed on your computer. Then you can install the dependancies and compile:

$ cd meteociel_api/docs
$ pip install -r requirements.txt
$ make html

You can find the compiled html documentation in meteociel_api/docs/_build/html/index.html

License

This code is provided under the GNU General Public License v3.0 (GPLv3).

Please refer to LICENSE file for further informations.