Python Boilerplate in Flask.
Speed up building your scalable application with this boilerplate which includes the latest python support, and a lot more features like Admin panel,
SMTP configuration, LRF flow(Login and Registration), mail authentication, separate settings file for root project configuration,
travis integration(CI), alembic (database migrations tool), faker(fake data generator), ORM support(SQLAlchemy), Jinja2 (Template Engine) and it is flexible enough for adding and using other libraries.
FlaskBoilerPlate
├── app/
│ ├── api/
│ │ ├── v1/
│ │ │ ├── __init__.py
│ │ │ ├── routes.py
│ │ │ └── views.py
│ │ └── __init__.py
│ ├── auth/
│ │ ├── __init__.py
│ │ ├── forms.py
│ │ ├── models.py
│ │ ├── routes.py
│ │ └── views.py
│ ├── static/
│ │ ├── css/
│ │ ├── img/
│ │ └── js/
│ ├── templates/
│ │ ├── email/
│ │ ├── errors/
│ │ ├── forms/
│ │ ├── layouts/
│ │ └── pages/
│ ├── toolbox/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ └── email.py
│ ├── __init__.py
│ └── seeding.py
├── env/
├── migrations/
├── config.py
├── requirements.txt
├── run.py
├── WSGI.py
└── README.md
virtualenv env
\path\to\env\Scripts\activate
sudo apt install python3-venv
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt # for windows
pip3 install -r requirements.txt # for linux
POSTGRES = {
'user': 'postgres',
'pw': 'password',
'db': 'my_database',
'host': 'localhost',
'port': '5432',
}
SQLALCHEMY_DATABASE_URI = 'postgresql://%(user)s:\%(pw)s@%(host)s:%(port)s/%(db)s' % POSTGRES
flask db init
flask db migrate -m "Initial migration."
flask db upgrade
set FLASK_APP=run.py
set FLASK_ENV=development
flask run
export FLASK_APP=run.py
export FLASK_ENV=development
flask run
flask seeder --count=n # here n is number of user