- (optional) create a new virtual environment (
mkvirtualenv taxi -p python3
or simplymkvirtualenv taxi
if your defaultpython
is3.8
) - install dependencies (
pip install -r requirements.txt
) - run the server (
uvicorn main:app --port 8080
)
- build docker image (
docker build -t local/taxi .
) - start container with freshly built image and expose desired port (
docker run --rm -p 8080:8080 local/taxi
)
- install development dependencies (
pip install -r requirements-dev.txt
) - run tests with
py.test --cov=.
(also displays coverage metrics). Runs both unit and functional tests
Ones you are running application server on own local machine - your can familiarize yourself with the API structure using Swagger docs. As with any documentation - it's not perfect, but still better than nothing!