python setup.py sdistpip install <package_path> --upgradeFor one processor running
python -m chess_calculator.server
For multi processes running
pip install uwsgi
uwsgi -w chess_calculator.server:app <other uwsgi options>
For example:
uwsgi --http :8000 -w chess_calculator.server:app --master --processes 8
endpoint: /
method: only POST (for JSON exchange)
body:
{
"n": <int>
"chessPiece": "queen"|"knight"|"rook"|"bishop"
}
response:
{
"solutionsCount": <int>
}
endpoint: /quick (using precalculated values)
method: only POST (for JSON exchange)
body:
{
"n": <int>
"chessPiece": "queen"|"knight"|"rook"|"bishop"
}
response:
{
"solutionsCount": <int>
}
pip install uwsgi
python -m pytest .
Add parameters(port, ip address) for one process mode. Current algorithm supports calculation in case when figure count is not equal linear size of a board. Add this feature to API.