abin-m/Weather-api-imd — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small Python REST API that gives current weather details from the India Meteorological Department website.

I want to be able to run a local FastAPI server, then visit a URL like /weather/90060 where the number is a city ID, and get back a clean JSON response with fields like maximum temperature, minimum temperature, rainfall, humidity, sunset, sunrise, moonrise, and moonset.

Please include a simple stations data file if needed, handle bad or missing city IDs nicely, and make the response easy for another app to consume. Since this depends on scraping the IMD website, keep the code simple and make it clear in the README that it may break if IMD changes their site.

Set up the project so I can install requirements, run it with uvicorn, and test it from the browser or an API client.

Want more depth? Deep Reverse