This is a learning project for me to learn Flask with Python. I use NodeJS / TS primarily and want to use Python more to do web backend stuff. Therefore, I am not using React / separate frontend for this project. I want to focus on the backend and the tutorial I am following is using Jinja2 templates.
See it live
This project uses advanced file structure and is not recommended for beginners. If you are a beginner, I recommend you follow the codebase here
-
Rename
env.local
to.env
and provide values for each entry in the file.Head to OpenWeatherMap to get an API key.
-
Create a virtual environment
python -m venv .venv
-
Activate the virtual environment
source .venv/bin/activate
-
Install the dependencies
pip install -U pip && pip install -r ./requirements/requirements.txt
-
Run the app
cd app FLASK_ENV=development python server.py
-
Open the app in your browser at
http://localhost:<PORT_FROM_CONF>
-
When you are done, kill the app and deactivate the virtual environment
# Kill the app CTRL + C # Deactivate the virtual environment deactivate