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.1.1.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file firapria-0.1.1.tar.gz.

File metadata

  • Download URL: firapria-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for firapria-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a19f7f26ecd2afef2205f2e879dbcff1096369a085699842e0492cf9679b8731
MD5 81827c39b0a282f20a132b60b14461d7
BLAKE2b-256 dfdd3c7f0bdb8ac1f0f13e40a04952b83800c34e621de9dcf948e5a62ed1f21e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page