Skip to content

mewebstudio/flask-rest-boilerplate

Repository files navigation

flask-rest-boilerplate

Installation
pip install -r requirements.pip

for development

cp .env.dev .env

for production

cp .env.prod .env
Migrate DB
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py db upgrade
Load dummy data
$ python fixtures.py
Mailing example
from flask_mail import Message
from settings import mail

def send_email():
    msg = Message(
        subject='Hello',
        sender=('Sender Name', '[email protected]'),
        recipients=['[email protected]'],
        html='<p><strong>Hello,</strong></p><p>body</p>',
    )
    mail.send(msg)