

Picture of the day, or POTD, is a featured image displayed daily on the home page of Wikipedia. Now that you have everything set up, you can start writing code for the Picture of the Day viewer. run () Step 3: Picture of the day viewer route ( "/" ) def hello (): return "Hello World!" if _name_ = "_main_" : APP. When you run it (using flask run or python app.py), it should display "Hello world" at #!/usr/bin/python3 from flask import Flask APP = Flask ( _name_ ). If you have everything successfully installed, place the following script in app.py, inside your project folder: $HOME/picture-of-the-day-viewer/app.py. Step 2: Create a simple Flask application If you don't have pip already, install it from the official Pip website.

Pip is a package manager that you can use to install Flask: pip install flask. See the Python beginner's guide for further instructions on installing Python on different operating systems. You can download the latest Python version from here: MediaWiki Action API's Images and Imageinfo modulesĪ step-by-step process for building this application Step 1: Set up Python and Flask development environment Setting up Python.This tutorial will teach you how to do this using: In this tutorial, you will learn how to build a Wikipedia:Picture of the day viewer using the MediaWiki Action API.ĭownload the code from GitHub Browse the app on Toolforge Using the API in MediaWiki and extensions.Perform a prefix search for page titles.Get the current user's watchlist as a feed.Get tokens for data modifying operations.Get meta information about the wiki and user.This page is part of the MediaWiki Action API documentation.
