This is a Flask-based voting application that allows users to get the weather given a city. It uses an external API which you will need to register for and create an API key for (https://www.weatherapi.com)
- Python 3.7 or higher
- PostgreSQL
- Clone the repository:
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- On Windows:
venv\Scripts\activate - On macOS and Linux:
source venv/bin/activate
- Install the required dependencies:
-
Ensure PostgreSQL is installed and running on your system.
-
Create a new PostgreSQL database for the application:
createdb weather
- Update the database connection string in
app.py:
SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@localhost/voting'
Replace username and password with your PostgreSQL credentials.
Set the Flask application environment variables:
On Windows:
set FLASK_APP=app.py
set FLASK_ENV=development
On macOS and Linux:
export FLASK_APP=app.py
export FLASK_ENV=development
Run the Flask development server:
flaskk run
Open your web browser and navigate to http://127.0.0.1:5000 to access the application.
This project is licensed under the MIT License - see the LICENSE file for details.