Simple framework for building REST API with Flask
python3 -m venv venv
source venv/bin/activate
or Conda
conda create --name python3.7 python=3.7
conda activate python3.7
pip install poetry
poetry install
Configure the environment variables in folder /config
Run the flask app
python run.py [port]
You can use docker instead of the above Installation & Usage steps.
Check port's availability
$ sudo nc localhost <port number> < /dev/null; echo $?
Update docker-compose.yml
file to connect nginx webserver to host's port
webserver:
...
ports:
- '8000:80'
networks:
- app-network
...
Run the docker daemon
$ docker-compose up -d
Check docker container
$ docker ps -a
Run test
coverage run -m pytest
See the test coverage report
coverage report