Skip to main content

Get pollution indices for IDF (France)

Project description

Build status Coverage status Pypi package

firapria is a lightweight library to extract pollution indices from Airparif website for IDF (France).

Install

pip install firapria

Since version 0.1.1, firapria supports both Python 2.x and 3.x.

Usage

from firapria.pollution import get_indices
indices = get_indices()

It returns three integers, for yesterday’s, today’s and tomorrow’s indices. It might return only two integers sometimes, it’s when no prevision is available for tomorrow’s indice, usually before 11 AM.

The library also include a simple CLI of the same name:

$ firapria
Pollution:
    Yesterday: 42
    Today: 40
    Tomorrow: 40

Before 0.1.1

get_indices was introduced in version 0.1.1. Before that one, another API was used. It’s still supported, but the new API is easier.

from firapria.pollution import PollutionFetcher
indices = PollutionFetcher().indices()

Tests

Clone this repo, then:

[sudo] make deps
make check

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

firapria-0.2.0.tar.gz (4.2 kB view hashes)

Uploaded Source

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