Skip to main content

An open-source package to easily obtain real-time, historical,or forecasted air quality data for anywhere in the world. Reliable,accurate and simple.

Project description

Ozon3

SVG of ozon3 logo

PyPI version PRs Welcome GitHub Complete Documentation Dependency Review Tests codecov Buy Me a Coffee

The simplest AQI API

Getting air quality data with Python should be easy and straightforward - and that's exactly what Ozon3 can help you with. With Ozon3, just 4 lines of code are enough to get you the data you need. And the best part is that you can trust this data to be accurate and reliable, since the package uses the World Air Quality Index's API under the hood! ✅ 📈

Use Ozon3 to get real-time air quality data, or historical data from 2014 onwards, and fetch air quality data for anywhere in the world in seconds.

You can view our complete documentation here

Don't forget to star Ozon3 repository if you found it helpful

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 Ozon3 here

Getting your API token

To use Ozon3, 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

Real-time data

import ozon3 as ooo

o3 = ooo.Ozon3('YOUR_PRIVATE_TOKEN')
data = o3.get_city_air('New Delhi')

for many cities:

data = o3.get_multiple_city_air(['London', 'Hong Kong', 'New York'])     # As many locations as you need

Historical data

data = o3.get_historical_data(city='Houston')     # data from 2014 onwards!

Examples In Action 🎬

Gif of Ozon3.get_city_air()

Gif of Ozon3.get_multiple_city_air()

Gif of Ozon3.get_historical_data()

Air Quality Parameters

Ozon3 can fetch the following parameters:

  • aqi: air quality index, a measurement of air quality that tells you how clean or polluted the air is. It is measured in micrograms per cubic meter (µg/m3).
  • pm25: fine particulate matter, a measure of 2.5 micrometers or smaller particles in the air. It is measured in micrograms per cubic meter (µg/m3).
  • pm10: respirable particulate matter, a measure of 10 micrometers or smaller particles in the air. It is measured in micrograms per cubic meter (µg/m3).
  • o3: a measure of ground level ozon3 concentrations in the air. It is measured in parts per billion (ppb).
  • co: a measure of carbon monoxide concentrations in the air. It is measured in parts per billion (ppb).
  • no2: a measure of nitrogen dioxide concentrations in the air. It is measured in parts per billion (ppb).
  • so2: a measure of sulfur dioxide concentrations in the air. It is measured in parts per billion (ppb).
  • dew: dew point, the temperature the air needs to be cooled to in order to reach 100% relative humidity. It is measured in Celsius (°C) or Fahrenheit (°F).
  • h: relative humidity, a measure of moisture in the atmosphere. It does not have a standard unit of measurement.
  • p: atmospheric pressure, a measure of the weight of atoms and molecules that make up the layers in the atmosphere. It is measured in Pascal (Pa).
  • t: temperature, a measure of thermal energy in one or a combined substance at a given time. It is measured in Celsius (°C) or Fahrenheit (°F).
  • w: wind speed, a measure of air in motion. It is measured in kilometers per hour (km/h)

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

Ozon3 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, Ozon3 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. Ozon3 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 Ozon3 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! These are our amazing contributors :)

Enjoy using Ozon3! 🥳 🍾 🚀

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

Uploaded Source

Built Distribution

ozon3-4.0.2-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file ozon3-4.0.2.tar.gz.

File metadata

  • Download URL: ozon3-4.0.2.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ozon3-4.0.2.tar.gz
Algorithm Hash digest
SHA256 cc1915ca9229663146ab00d0ee5073c2bb0c4e1b2d7650447ea4f6a97c9a8ac0
MD5 9ba681da00464cc60b7a055edfecea2a
BLAKE2b-256 78898cae1ed5e7b0ec5ae639a681fe6ac5ee28953e51da859d607bc88a8104e9

See more details on using hashes here.

File details

Details for the file ozon3-4.0.2-py3-none-any.whl.

File metadata

  • Download URL: ozon3-4.0.2-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ozon3-4.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc8a340e691dca7e4271d1a64e91ccee38df76b9391827fd5cf2b80bf0ac3f9e
MD5 1434d06d0df84889b567c6516ac97dae
BLAKE2b-256 4c571a825ac7f4ea1fcb93a12a7bfd02388339cf3c4ba562b8bc909c39a82be5

See more details on using hashes here.

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