Python wrapper for the World Air Quality Index Project JSON API
- Get an API token from the World Air Quality Index Project
- Create an environment variable called AQIPY_TOKEN:
export AQIPY_TOKEN='<your_new_token>'
pip install waqi-python
>>> from waqi_python import client as base
>>> client = base.WaqiClient()
>>> my_station = client.get_local_station()
>>> my_station.city.name
'San Francisco-Arkansas Street, San Francisco, California'
>>> my_station.aqi
46