This is a flask microframework boilerplate app
-
Install python if you don't have it.
-
Clone this repository.
-
Navigate into the project directory:
$ cd flask-boilerplate
-
Create a new virtual enviroment:
Note: When running the commands, you may need to type python3/pip3 instead of python/pip depending on your setup.
$ python -m venv venv $ . venv/bin/activate
-
Install the dependencies (python pacakages) listed in "requirements.txt" file:
$ pip install -r requirements.txt
-
Create the enviroment variables file ".env":
$ touch .env
-
Add this variables to the .env file:
FLASK_APP=app FLASK_ENV=development
-
Run the app:
$ flask run
- Flask Project Layout: https://flask.palletsprojects.com/en/2.2.x/tutorial/layout/
We use .env to store environment variables for our application, which allows us to keep sensitive information, such as API keys and passwords, out of our codebase and hidden from others.
required library: --> python-dotenv