Historical UK air pollution data can be requested as .csv files from the DEFRA website.
JSON format hourly data since from Sept 2017 is available through the air-aware API.
Interactive air quality charts
Third-party libraries: The following examples depend upon a small number of third-party libraries including pandas, matplotlib and requests
Jupyter Notebook: The Jupyter Notebook provides a convenient means for running short scripts to manipulate data and render charts
Flask: A Python web development framework well suited for making API calls and plotting live data with interactive charts