/text-compare

Text comparison exercise

Primary LanguagePythonMIT LicenseMIT

Text Comparison Exercise

This is a simple implementation of a text comparison algorithm, it has been implemented without any dependencies apart from some basic Flask API and Requests.

Requests is used in the test.py script in order to test POST requests against the main application

The main application can be started in two different modes according to the provided flags.

Executing the application in server mode

When the -S flag is passed the application will run as a web service on the host computer and it will listen for POST requests at the default Flask debug address http://127.0.0.1:5000

In order to execute the comparison between two given texts the API shall be routed to:

http://127.0.0.1:5000/compare

Executing the application in shell mode

When the comparison is to be executed from a shell script or from the command line, the command line shall be given in the following format:

python3 ./main.py -A first_filename -B second_filename

-A represents the path to the first text file to be loaded

-B represents the path to the second text file to be loaded