Skip to main content

A package to get air quality data using the WAQI API

Project description

Ozone ☁️

PyPI version PRs Welcome GitHub Buy Me a Coffee

The simplest AQI API

I want to make it easy to get your hands on accurate air quality data for your project, whatever it is. Ozone makes this as straightforward as typing out a few lines of code. Ozone uses the World Air Quality Index's API to fetch data, so you can trust the data you get to be accurate and reliable. ✅ 📈

You can view our complete documentation here

Table of Contents

Install ozon3

Getting your API token

Getting started

Contributing and submitting PR's

Semantic Versioning System

Attributions

License and TOS

Contributors

Install it here!

pip install ozon3

You can find more information on the PyPI page for Ozone here (called ozon3 on PyPI).

Getting your API token

To use Ozone, you must first request and get a your own unique API token 🎫. This is required to access for the underlying API to work 👮🏼‍♂️.

This is very easy to do, and takes no time at all as your token is generally emailed to you instantly.

Get your token here!

Getting started 🏃‍♂️

import ozone as ooo

o3 = ooo.Ozone('YOUR_PRIVATE_TOKEN')
data = o3.get_city_air('CITY_NAME')

for many cities:

data = o3.get_multiple_city_air([ARRAY OF CITY NAMES])

Examples In Action 🎬

Gif of ozone.get_city_air()

Gif of ozone.get_multiple_city_air()

Air Quality Parameters

Ozone can fetch the following parameters:

  • aqi: air quality index, a measurement of air quality that tells you how clean or polluted the air is
  • pm25: fine particulate matter, a measure of 2.5 micrometers or smaller particles in the air
  • pm10: respirable particulate matter, a measure of 10 micrometers or smaller particles in the air
  • o3: a measure of ground level ozone concentrations in the air
  • co: a measure of carbon monoxide concentrations in the air
  • no2: a measure of nitrogen dioxide concentrations in the air
  • so2: a measure of sulfur dioxide concentrations in the air
  • dew: dew point, the temperature the air needs to be cooled to in order to reach 100% relative humidity
  • h: relative humidity, a measure of moisture in the atmosphere
  • p: atmospheric pressure, a measure of the weight of atoms and molecules that make up the layers in the atmosphere
  • t: temperature, a measure of thermal energy in one or a combined substance at a given time
  • w: wind speed, a measure of air in motion

Sample output: blehblhe

Contributing and submitting Pull requests

We love PR's!

Take a look at the CONTRIBUTING.md file for details on how to go about this!

Semantic Versioning System

Ozone uses a semantic versioning system to increment its release version number. Using this model, changes in version numbers can help indicate the meaning of modified code for each version.

See more information on semantic versioning here.

World Air Quality Index and EPA attribution

This package is a wrapper around an API provided by the World Air Quality Index project. Without them as well as the US EPA, Ozone would not exist. Please consider visiting the WAQI website and contributing to their project if you have time:

World Air Quality Index

United States Environmental Protection Agency

LICENSE and Terms of Services 📰

  1. Ozone is licensed under the GNU GENERAL PUBLIC LICENSE v3.0, and so it cannot be used for closed-source software or for monetary gain.
  2. The WAQI API, which Ozone uses to provide data, has it's own Acceptable Usage Policy. Please refer to it for more details.

Contributors

Contributions of any kind are welcome and these are our amazing contributors.

Enjoy using Ozone! 🥳 🍾 🚀

Created by Milind Sharma

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

ozon3-1.5.0.tar.gz (21.0 kB view hashes)

Uploaded Source

Built Distribution

ozon3-1.5.0-py3-none-any.whl (21.2 kB view hashes)

Uploaded 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