This notional exercise implements a basic API which returns all anagrams of a given word based on an internal word dictionary. At least, that's what it's supposed to do. Continue reading for more details.
python3 -m venv localenv
- create local virtual envsource localenv/bin/activate
- enable virtual env shellpip install -r requirements.txt
- install dependenciespip install -r requirements_dev.txt
- install development dependencies for testingpytest
- run unit testsflask run
- run local server
After starting the server, the REST endpoint can be invoked using http://localhost:5000/?term=word where 'word' is the term to find anagrams for. The response should be a JSON payload containing a string array of all matching anagrams.
This project has the following issues:
- The included unit test fails
- The endpoint doesn't return correct results
Please ensure all problems are resolved as part of this exercise.