Added query.py (single use fetch of sensor data for cron scheduling)