Ready to go with Flask
$ sudo apt-get install python-virtualenv
$ sudo yum install python-virtualenv
$ sudo pacman -S python-virtualenv
If you are on Mac OS X or Windows, download get-pip.py, then:
$ sudo python2 Downloads/get-pip.py
$ sudo python2 -m pip install virtualenv
$ mkdir your-project-name
$ cd your-project-name
$ python3 -m venv venv
$ py -3 -m venv venv
If you needed to install virtualenv because you are using Python 2, use the following command instead:
$ python2 -m virtualenv venv
> \Python\Scripts\virtualenv.exe venv
Before you work on your project, activate the corresponding environment:
$ . venv/bin/activate
> venv\Scripts\activate
Move to boilerplate's root directory and execute the following.
pip install -r requirements.txt
It will set the application to execute
$ export FLASK_APP main.py
> set FLASK_APP main.py
It will allow you to manage your application behaviour with different environment.
$ export FLASK_ENV development
> set FLASK_ENV development
It will allow us to do application debug during execution.
$ export FLASK_DEBUG=1
> set FLASK_DEBUG=1
It will run the Flask application based on your configurtion/env-variables that have been assigned.
flask run