You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few functions that are exposed by the commands module (see its __init__.py). They are currently exposed via the cli module on the command line, via Click.
Expose these functions over HTTP by setting up a simple Flask webapp. Create a POST endpoint against each of these functions.
Prerequisites
You know basic git, i.e. how to fork this repo, clone this repo, work on a branch and send a PR
You have basic working knowledge of Python
You are able to run Python on your machine
You know, or are willing to learn through a few simple tutorials, how to set up a basic Flask app and write a minimal unit test for it.
Details
The Flask app file should live in the webapp directory.
It should import the functions from the commands module
It should expose these functions via HTTP POST
You DO NOT need to create any UI/HTML for this webapp.
How to Test
You can write a super simple unit test by patching the underlying functions as mocks, and asserting that they are invoked. See test_cli.py for an example, and how to test Flask applications
If you are familiar with curl/Postman/any other similar tool, feel free to spin up the Flask app and test it using one of these. Be aware though that you'll most likely see errors from the Wikidata API about missing username/password/auth, this is fine.
Problem
There are a few functions that are exposed by the
commands
module (see its__init__.py
). They are currently exposed via thecli
module on the command line, via Click.Expose these functions over HTTP by setting up a simple Flask webapp. Create a
POST
endpoint against each of these functions.Prerequisites
Details
webapp
directory.commands
moduleHow to Test
Hints
The text was updated successfully, but these errors were encountered: