Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cynthiawahome/weatherforecast


https://github.com/cynthiawahome/weatherforecast

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        

# 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](https://openweathermap.org/) 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](LICENSE) file for details.