python API python to get active weather alerts fromhttp://vigilance.meteofrance.com/
Project description
Vigilance Météo provides a python API to fetch weather alerts in France from http://vigilance.meteofrance.com website.
Class descritpion
ZoneAlerte class allows to fetch active alerts for a french department.
Variables from ZoneAlerte class:
_departement : The department watched
_dateMiseAJour : Date and time of the weather forcast update from MétéoFrance
_listeAlertes : A dictionary with all the alerts. Keys for alert type and value for criticity (by color).
Methods from ZoneAlerte class:
miseAJourEtat() : update alerts list by feching latest info from MétéoFrance forcast.
Properties from ZoneAlerte class
syntheseCouleur : return the overall criticity color for the department
urlPourEnSavoirPlus : return the URL to access more information about department weather alerts from the MétéoFrance website.
messageDeSynthese : return a string with textual synthesis of the active alerts in department.
Example
Use case example:
>>>import vigilancemeteo >>>zone = vigilancemeteo.ZoneAlerte('92') >>>zone.syntheseCouleur 'Vert' >>>zone.urlPourEnSavoirPlus 'http://vigilance.meteofrance.com/Bulletin_sans.html?a=dept75&b=1&c=' >>>zone.messageDeSynthese 'Aucune alerte en cours.'
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
Built Distribution
Hashes for vigilancemeteo-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 295745b99617a46564ef86ee16760cb66e56cd524301af00eebde489b82d3568 |
|
MD5 | 65fb8a2678d224da42efb341e63cbc0f |
|
BLAKE2b-256 | a01d468048ccf486703ac25692643be357ed9f6dca89b33d1f6a8db7efc74dbc |