Skip to content

Flask API Starter provides an example using only flask, sqlalchemy and marshmallow...

License

Notifications You must be signed in to change notification settings

cdagli/flask-api-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-api-starter

Build Status

This project provides a boilerplate for building a Rest API using flask.

Other modules used are listed below;

  • sqlalchemy
  • marshmallow
  • sqlalchemy marshmallow
  • flask sqlalchemy
  • flask swagger

alt text

*swagger documentation visualized with Swagger UI Console Chrome extension

###To run locally:

git clone https://github.com/cdagli/flask-api-starter
cd flask-api-starter
virtualenv venv
source venv/bin/activate
cd src
pip install -r requirements.txt
python -m run 

Run tests:

nose2 -v

###Using Docker Build with docker:

git clone https://github.com/cdagli/flask-api-starter
cd flask-api-starter/src
docker build -t flask-api-starter .

Run in development mode:

docker run -dt --name=flask-api-starter -v $PWD:/app -p 5000:5000 -e 'WORK_ENV=DEV' flask-api-starter

Run in production mode:

docker run -dt --restart=always --name=flask-api-starter -p 5000:5000 -e 'WORK_ENV=PROD' flask-api-starter

Remove the container:

docker rm -f flask-api-starter

To see logs and connect the container:

docker logs --follow flask-api-starter
docker exec -it flask-api-starter bash

About

Flask API Starter provides an example using only flask, sqlalchemy and marshmallow...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages