Python code using API to get historical data

So you are aware, PurpleAir data can be downloaded without using the API through our Sensor Data Download Tool. More information is available here: Download Sensor Data.