Working python code for now - 10 second interval query.