/python-api

python api boilerplate

Primary LanguagePythonMIT LicenseMIT

PYTHON API

license

Version

v1.0.0

Dependencies

Demo

PYTHON

Installation

  • create virtualenv virtualenv -p python python-env
  • work on virtualenv source python-env/bin/activate
  • install python dependencies by running pip install -r requirements.txt
  • Generate documentation by running apidoc -i ./app/ -o ./documentation/ -f .py
  • Install database mock data by running python seeders/seed_<seed-name>.py

How to Use

Testing

  • run python -m unittest tests/test_<test-name>.py

DOCKER

Installation

  • build docker-compose build
  • install pip docker exec -ti pythonapi pip install -r requirements.txt
  • seed data docker exec -ti pythonapi python seeders/seed_<seed-name>.py

How to Use

  • run docker-compose up
  • run docker-compose start

Testing

  • run docker exec -ti pythonapi python -m unittest tests/test_<test-name>.py