Skip to content

Stella-Zhou-s/sojern_hw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

This is home assignment of Stella Zhou for Sojern
I finished "compare versions" and "math api" with Python.
To make the web application code more robust and maintable, I use python exception handler and logger.

To run the Python Flask Application for "math api"
python app.py

Please use POST request to test APIs and include "nums" and "quant" as key in body, for example:

curl -X POST http://localhost:8010/min -H "Content-type: application/json" -d '{"nums":[1, 2, 3], "quant":3}'

curl -X POST http://localhost:8010/max -H "Content-type: application/json" -d '{"nums":[1, 2, 3], "quant":3}'

curl -X POST http://localhost:8010/avg -H "Content-type: application/json" -d '{"nums":[1, 2, 3]}'

curl -X POST http://localhost:8010/median -H "Content-type: application/json" -d '{"nums":[1, 2, 3]}'

curl -X POST http://localhost:8010/percentile -H "Content-type: application/json" -d '{"nums":[1, 2, 3], "quant":50}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages