agamkachhal/Melbourne-Weather-Data ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple Python script that pulls the Melbourne microclimate sensor data from the public API and saves it into a local SQLite database called bloomeroo.db.
I want it to read the API URL and page size from a .env file, fetch the records in pages, and keep going until there is no more data. It should create the database and a sensor_readings table automatically if they do not already exist, then store the results there so I can query them later with sqlite3.
Please make it easy to run from main.py, and include any basic setup I need like dependency install and an example .env file. If you need to, check the current API docs online so the request format is correct. Also make the script handle simple failures cleanly, like missing env values or a bad network response, so it does not just crash without a helpful message.
Are you gonna build this?
make sure you review the code using coderabbit