Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cynthiawahome/weatherforecast
https://github.com/cynthiawahome/weatherforecast
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cynthiawahome/weatherforecast
- Owner: CynthiaWahome
- Created: 2024-03-17T22:08:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-17T22:31:54.000Z (8 months ago)
- Last Synced: 2024-03-18T00:32:11.479Z (8 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.