https://github.com/treytuscai/weatherapp
A simple weather forecasting web app built with Flask, utilizing the OpenWeatherMap API to provide real-time weather updates for cities worldwide.
https://github.com/treytuscai/weatherapp
api bootstrap cicd css flask html javascript linting pytest python
Last synced: 5 months ago
JSON representation
A simple weather forecasting web app built with Flask, utilizing the OpenWeatherMap API to provide real-time weather updates for cities worldwide.
- Host: GitHub
- URL: https://github.com/treytuscai/weatherapp
- Owner: treytuscai
- License: mit
- Created: 2025-02-05T17:44:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-06T17:56:11.000Z (over 1 year ago)
- Last Synced: 2025-06-16T17:46:21.957Z (about 1 year ago)
- Topics: api, bootstrap, cicd, css, flask, html, javascript, linting, pytest, python
- Language: CSS
- Homepage: https://weather-appv-3d0daf77a308.herokuapp.com/
- Size: 345 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WeatherApp ๐ฆ๏ธ
Welcome to **WeatherApp**, a sleek and simple weather forecasting web application powered by the OpenWeatherMap API! Get up-to-date weather information for any city in the world with a user-friendly interface.
## ๐ Features
- **Real-time weather updates**: Get the current temperature, weather conditions, and humidity for any city.
- **City and country validation**: Ensure the city and country inputs are alphanumeric, with the country code strictly limited to two capitalized letters.
- **Error handling**: Displays informative error messages for incorrect or missing input.
- **Lightweight and Fast**: Minimalistic design focused on delivering weather information quickly and effectively.
## โ๏ธ Tech Stack
- **Flask**: Web framework for building the app.
- **OpenWeatherMap API**: To fetch real-time weather data.
- **Heroku**: To host the app and make it accessible online.
- **HTML/JS/Bootstrap**: For the website's frontend interface.
## ๐ Getting Started
1. **Clone the Repository**:
```bash
git clone https://github.com/treytuscai/weatherapp.git
cd weatherapp
```
2. **Set up a Virtual Environment** (Optional but recommended):
```bash
python3 -m venv venv
source venv/bin/activate # For macOS/Linux
venv\Scripts\activate # For Windows
```
3. **Install Dependencies**:
```bash
pip install -r requirements.txt
```
4. **Set Up the OpenWeatherMap API Key**:
- Go to [OpenWeatherMap](https://openweathermap.org/api) and create an account.
- Get your **API Key** and add it to a `.env` file:
```env
API_KEY=your_api_key_here
```
5. **Run the Application**:
```bash
flask run
```
6. **Access the Web Application**:
Visit `http://127.0.0.1:5000` in your browser to start using the app locally!
## ๐ Live Demo
Check out the live version of **WeatherApp** hosted on Heroku:
[WeatherApp on Heroku](https://weather-appv-3d0daf77a308.herokuapp.com/)
## ๐งช Testing
The project includes unit and functional tests to ensure that everything works smoothly. You can run the tests with:
```bash
pytest
```
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.