/python-flask-microservice

A lightweight microframework to build microservices bases on python 3.5+ and flask

Primary LanguagePythonMIT LicenseMIT

python-flask-microservice

A lightweight microframework to build microservices bases on python 3.5+ and flask

Requirements

  • python 3.7
  • pipenv 2018.11.26

Stack

  • python +3.7
  • flask +1.1.1
  • flask-migrate +2.5.2
  • flask-sqlalchemy +2.4.0
  • flask-marshmallow +0.10.1
  • flask-restplus +0.13.0
  • marshmallow-sqlalchemy +2.4.0
  • marshmallow +3.0.0b12
  • psycopg2-binary +2.8.3

Contribution guide

Remotes

The remotes follow the convention:

  • origin: fork in the account of the developer

  • upstream: main repository

Commit Style

Please you consider de following git styles for commit messages:

http://udacity.github.io/git-styleguide/

Building

Before starting:

$ pip3 install pipenv | brew install pipenv

Running

For local environment:

$ cd python-flask-microservice
$ pipenv install
$ pipenv shell
$ export APP_CONFIG_FILE=$(pwd)/config/default.py
$ python app.py

For development environment:

$ cd python-flask-microservice
$ pipenv install
$ pipenv shell
$ export APP_CONFIG_FILE=$(pwd)/config/development.py
$ python app.py

For staging environment:

$ cd python-flask-microservice
$ pipenv install
$ pipenv shell
$ export APP_CONFIG_FILE=$(pwd)/config/staging.py
$ python app.py

For production environment:

$ cd python-flask-microservice
$ pipenv install
$ pipenv shell
$ export APP_CONFIG_FILE=$(pwd)/config/production.py
$ python app.py

Packaging

// TODO

Exploring

Only for local environment:

Go to http://localhost:5000/ to see the Swagger Explorer

alt tag

License

MIT

Free Software, Hell Yeah!