Skip to content
Adding two numbers as a service.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile
Makefile
Pipfile
Pipfile.lock
README.md
adder.py
test_adder.py

README.md

example-adder

A click-based application running on top of pipenv and docker.

Usage

Pipenv must be installed as a prerequisite.

$ pip install pipenv

Adder

$ pipenv run python adder.py --lhs 1 --rhs 2

# equivalently
$ ADDER_LHS=1 ADDER_RHS=2 pipenv run python adder.py

Docker

$ docker build -t adder:latest .

$ docker run -it adder:latest \
    pipenv run ./adder --lhs -1 --rhs 3

$ docker run \
    -e ADDER_LHS=-1 \
    -e ADDER_RHS=3 \
    -it adder:latest

Tests

$ pipenv sync --dev
$ pipenv run python -m pytest
You can’t perform that action at this time.