Get pollution indices for IDF (France)
Project description
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
File details
Details for the file firapria-0.2.0.tar.gz
.
File metadata
- Download URL: firapria-0.2.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 518c2b14624a24cbce57077d5aa7f0f9ddb69ef722b6fba6e8837d1fb7d652a8 |
|
MD5 | 907732296013808cb29d30f0746ea944 |
|
BLAKE2b-256 | 18b82dda980425bd44f1a46cce67e481a650fa8cc6196c94ad1d9dec2e2b9283 |