Skip to main content

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

vigilancemeteo-1.1.0.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

vigilancemeteo-1.1.0-py2.py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 2 Python 3

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