A modern web application that provides real-time weather information using FastAPI and OpenWeather API.
- Real-time weather data display
- City-based weather search
- Displays comprehensive weather information including:
- Temperature
- Feels like temperature
- Humidity
- Pressure
- Weather description
- Wind speed
- Country information
- Backend: FastAPI (Python)
- Frontend: HTML, JavaScript
- Template Engine: Jinja2
- API: OpenWeather API
- Python 3.8+
- FastAPI
- OpenWeather API key
- Clone the repository:
git clone https://github.com/Dharani-Dharan-24/weather-application
cd weather_application- Install dependencies:
pip install -r requirements.txt- Set up your OpenWeather API key:
- Sign up at OpenWeather
- Get your API key
- Set it as an environment variable or in your configuration
weather_application/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application and routes
│ ├── models.py # Data models
│ └── weather_service.py # Weather service logic
├── static/ # Static files (CSS, JS)
├── templates/ # HTML templates
│ ├── base.html
│ └── index.html
├── requirements.txt
└── README.md
- Start the FastAPI server:
fastapi dev main.py- Open your web browser and navigate to:
http://localhost:8000
- Enter a city name in the search box
- Click the search button or press Enter
- View the detailed weather information for the specified city
- Hourly weather forecasts
- Location pinning
- Country selection
- Enhanced UI animations and transitions
- Interactive backgrounds
This project is licensed under the MIT License - see the LICENSE file for details.