The official Python SDK for the OpenAQ API.
⚠️ OpenAQ python is still under active development and may be unstable until a v1.0.0 release
OpenAQ python is availble on pip.
pip install openaqDocumentation available at python.openaq.org
Documentation can also be run locally using hatch run docs:serve
The OpenAQ Python SDK is distributed under the terms of the MIT license.
Code is styled according to black, imports are sorted using isort, and code is linted using ruff.
Codebase can be automatically formatted and linted by running:
hatch run style:fmtstyle can be checked with:
hatch run style:checkmypy static type checking:
hatch run types:checkTesting uses pytest.
hatch run test:testFor many years py-openaq by David Hagan filled the gap for a Python API SDK for the OpenAQ API. Thank you to David for many years of maintaining py-openaq and for taking the original step to develop a Python tool for OpenAQ.