- Python 3.6.x+
- Flask
- Hypothesis
In Linux:
~/path/to/project/
In Windows:
C:\Users\UserName\path\to\project\
cd SanctionSystem
pip install -r requirements.txt
cd Rest_API
python TestStringSimilarity.py
cd Rest_API
python cli.py
cd Rest_API
python sanctions_api.py
- Countries
- USA
- Iceland
- Peru
- Individuals
- Kristopher Doe
- Jake Long
- Jose Juan Rivera
- Organizations
- Royal Arctic Line
- Not Disney
- Machu Pichu
Open Rest_API/sample.csv with any text editor
Add a line in format: {Individual},{Country},{Organization}
Save the changes to the file
Now we run the database_setup.py script
python Rest_API/database_setup.py
or if already in Rest_API folder
python database_setup.py
docker pull python
docker build --tag sanctionsystem:0.1a .
sudo docker run --rm -d --network host --name ss sanctionsystem:0.1a
NOTE| THE FIX WAS FOUND HERE:
docker run --publish 5000:5000 --detach --name ss sanctionsystem:0.1a
sudo nc localhost 5000 < /dev/null; echo $?
If result was a 0, then port is not available
docker rm --force ss
https://hub.docker.com/repository/docker/ccgmagno/sherpa_module_2
localhost:5000