Skip to content

CynthiaWahome/weatherForecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Weather Forecast App


This Python script fetches current weather data from the OpenWeatherMap API based on the user's input of a city name.

It then displays the weather information and writes it to a text file.

Usage

  1. Make sure you have Python installed on your system.
  2. Obtain an API key from OpenWeatherMap by signing up for an account.
  3. Clone or download the script weatherfForecast.py.
  4. Install the required libraries using pip install -r requirements.txt.
  5. Run the script using a Python interpreter.
  6. Enter the name of the city for which you want to get the weather forecast when prompted.
  7. The script will display the weather information on the console and save it to a text file weatherForecast.txt.

Dependencies

  • requests: For making HTTP requests to the OpenWeatherMap API.
  • datetime: For working with date and time.

Configuration

To use this script, you need an API key from OpenWeatherMap. Replace the placeholder api_key in the script with your actual API key.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages