You are browsing a read-only backup copy of Wikitech. The live site can be found at

Help:Tool Labs/My first Pywikibot tool

From Wikitech-static
< Help:Tool Labs
Revision as of 00:17, 9 May 2017 by imported>BryanDavis (Update account creation and tool labs membership instructions phab:T53642)
Jump to navigation Jump to search

Pywikibot is a Python library which automates work on MediaWiki sites. Use this guide to create your own tool based on Pywikibot and host it on Tool Labs.

Tool Labs account required: Before creating your tool, you need to create an account to access Tool Labs. Set up your user name and shell name and submit a Tool Labs project membership request.

Create your Pywikibot Tool account

Access your Pywikibot tool

After you create your Pywikibot's tool account, you can log into your tool project with SSH.

$ ssh <shell name>

Switch to your tool account:

maintainer@tools-bastion:~$ become <toolname>

Now, you can install Pywikibot.

Install Pywikibot

Using your tool account run the following:

  1. Use git to download Pywikibot:
    git clone --recursive
  2. Set up your bot for selected wikis by running:

Choose a license

Publish your source code

Create a documentation page