Create a Python Pywikibot script to download Wikimedia database dump

Pywikibot is a Python-based framework to write bots for MediaWiki (more information).

It would be useful to have a "download dump" script that fetches a Wikimedia database dump from , and places the dump in a predicable directory for semi-automated use by other scripts and tests.

Create a simple script that downloads a file (for example one of the stored files for French Wikipedia). The script should be stored in the scripts folder of Pywikibot. The user should be able to choose what file they want by providing the filename, the wiki (language/sister project) and the repository where it should be saved using command line arguments. Useful link:

You are expected to provide a patch in Wikimedia Gerrit. Documentation on Gerrit is available.

Task tags

  • python
  • pywikibot
  • python-requests
  • databases

Students who completed this task

Yifei He

Task type

  • code Code