Skip to content
Opinionated Flask serverless starter kit
Python Makefile Shell
Branch: master
Clone or download
Latest commit 2947899 Jan 25, 2020

README.md

Opinionated Serverless Flask

Comes with a lot of useful stuff ready to go.

Features

Quickstart:

Prerequisites:

brew install pipenv  # mac
python -m pip install --upgrade pip pipenv  # generic
npm i -g serverless

Create Project:

npx sls install --url https://github.com/jetbridge/sls-flask --name myapp
cd myapp
make init  # install dependencies and initialize project

Python Virtual Environment:

pipenv shell  # activate python virtual environment

Do Stuff:

flask  # CLI commands
flask run --reload  # run flask dev server
npm install  # install serverless plugins
sls wsgi serve  # run flask server under serverless
sls deploy  # deploy serverless app
make deploy-dev  # deploy dev to AWS and reset database
make hooks  # install pre-commit hooks

Database:

createdb TEMPLATE
flask init-db  # recreate schema from models
flask seed  # populate with sample data

flask db  # other utilities

API Documentation:

Once your flask dev server is running:

You can’t perform that action at this time.