A simple Django project that fetches and displays weather data using the Open-meteo API.
- Fetch current weather data from the Open-meteo API
- User input for location (latitude & longitude) or the name of the city
- Focus on clean backend architecture using Django
- Python 3.8+
- Django 4.x
requestslibrary
Install dependencies:
pip install -r requirements.txt- User submits a location (latitude and longitude) or the name of the city.
- Backend sends a GET request to the Open-meteo API.
- Parsed weather data is returned to the user as JSON or rendered on a template.
Example Open-meteo endpoint:
https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41¤t_weather=true
python manage.py runserverNavigate to http://127.0.0.1:8000/ in your browser.