This is base example project for Python Flask Project. If someone want to start their project from beginning, then can clone this and build on top of this
-
Install Latest Python version from https://www.python.org/downloads/
- Set system environment variables for Python.exe, pip.exe (https://docs.python.org/3/using/windows.html#excursus-setting-environment-variables)
- Verify python installation using command
python --version - Verify pip availability using command
pip --version
-
Setup Flask
- Set environment for flask project using commands
set FLASK_APP=appandset FLASK_ENV=development - Create a project folder and change directory to the project directory using command
cd - Install Flask using
pip install flask - Verify flask version using the command
python -c "import flask; print(flask.__version__)" - Copy
app.pyfile from ``
- Set environment for flask project using commands
-
Run Flask Application
- Run Flask application using
flask run
- Run Flask application using
- Application
app.pyis the driver file for the application.- By default UI templates are kept inside
templatesfolder which will be automatically picked by framework - Styles, Scripts are kept inside
staticfolder
- Framework
staticfolder will have styles including the custom styles and bootstrap- Using
Bootstrap,Jqueryframeworks for UI - Bootstrap downloaded and kept with the project, so local development loading will be faster.
- You can use two routes
localhost:5000/andlocalhost:5000/secondLink - More updates to come...
Thank you 😊