Wikipedia API can be used to access wikipedia articles based on keyword provided.
Clone the repository and follow the steps below.
- python -m venv ....
- source .../bin/activate
- open a terminal type,
cd in to the pg directoryand type the commanddocker compose up.
-
Open another terminal and
cd in to the root directory of the projectand type the following command.docker build -t smart-wiki .docker tag smart-wiki:latest smart-wiki:v1.0.4.
-
You can test the wiki API application using the following commands.
docker run --rm smart-wiki smart wiki taxi --limit 10 --m True.
-
Input/Output: Once installed we should be able to run
smart --helpto get a help message with the subcommands. -
WHERE: a)
smart-wikiis the docker image. b)smartis the package. c)wikiis the module. d)taxiis the keyword (can be anything). e)--limit 10is the length of the result. f)--m Trueis optional and if included, it will only output the result in the terminal and not save it in db.
-
Open another terminal and
cd in to the airflow directoryand type the following command.docker compose up -d --build
-
You can access your airflow through the url
http://localhost:8080/and the worker through the urlhttp://localhost:5555/. -
Airflow use the official https://github.com/puckel/docker-airflow image as the base image