Run flask service and see root directory for automatically generated swagger documentation
All responses will have the form of a JSON response with a tag of 'Total' followed the sum result
{
"Total": "Sum integer value of the list passed"
}Definition
GET /total
Response
200 OKon success400 BADon invalid list being passed
NB: Default list function numbers = list(range(10000001)) provides sum result as seen below
{
"Total": "50000005000000"
}Definition
POST /total
Arguments
"List":lista list of integers to be summed
{
"List": "[1, 2, 3]"
}Response
200 OKon success400 BADon invalid list being passed
{
"Total": "6"
}List passed is assumed to only contain integers and no floats. Although, basic error handling has been put in place. The application was developed using a virtual environment (VENV) in Pycharm; Rather than a Docker container as the system is not expected to be deployed on scale.