This is a simple Flask application that displays weather information for a given city. It uses the OpenWeatherMap API to fetch weather data and the Photon geocoding API to obtain the location and timezone information for the city. The application is deployed on Render.
-
Clone the repository:
git clone https://github.com/Firangi0799/Flask-Weather.git -
Install the required dependencies:
pip install flask geopy timezonefinder requests pytz -
Obtain an API key from OpenWeatherMap by signing up for an account.
-
Replace the placeholder
API_KEYin theapivariable with your actual API key in theapp.pyfile:api = "https://api.openweathermap.org/data/2.5/weather?q=" + city + "&appid=YOUR_API_KEY"
-
Run the Flask application:
python app.py -
Open your web browser and go to Weather-App to access the application.
-
Enter the name of a city in the input field and click the "Get Weather" button.
-
The application will display the current weather condition, description, temperature, humidity, pressure, wind speed, and the current local time of the entered city.
The application is deployed on Render. You can access the live version of the application at https://your-app-name.onrender.com.
Contributions are welcome! If you find any issues or would like to add new features, please submit a pull request.
This project is licensed under the MIT License.