How to get it running
-
Extract the mmdb file from the above download and put it in the local directory of
main.py
-
Add credentials found in the assessment prompt's PDF to the sample aws.config file and rename it to 'aws.config.json'
-
Start a new virtualenv and install the packages from requirements.txt (assuming python 2.7)
-
Install MySQL locally (I used version 5.7)
-
Create a database, specifically using this command
CREATE DATABASE cti CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Otherwise there will be tons of weird encoding errors that seemed impossible to resolve with python code alone.
-
Setup a local mysql db user "ctiuser" with pass "ctipass" and a database named "cti" to keep it simple. These credentials are already put in
db.config.json
so you can change it if necessary, but again, just for simplicity. Normally the file would be put into gitignore, but doesn't matter for this project. -
run
python main.py