This is a Flask based API project which has two endpoints:
/verify
- Verifies an MBI following the short spec and returns true or false
/generate
- Generates and returns a random MBI, following the above-mentioned spec
The project utilizes pytest for its unit testing.
I have included a Postman collection for live testing of the API. This collection tests the verify endpoint, generate endpoint, as well as a combination of the two (generate then verify).
The API is permanently deployed at https://mbi-api.juanleonardosanchez.com/
It can be deployed locally using the included start.sh
which simply runs docker based on the provided Dockerfile.
sudo apt install python3-venv
python3 -m venv virtualenv
source virtualenv/bin/activate
pip install wheel uwsgi flask
sudo ufw allow 5000
python app.py