Manual:Pywikibot
Pywikibot is a Python library and collection of scripts that automate work on MediaWiki sites. Originally designed for Wikipedia, it is now used throughout the Wikimedia Foundation's projects and on many other wikis. | ![]() |
Running a bot
![Sanko Seisakusyo (三幸製作所) – Tin Wind Up – Tiny Sparkling Robo – Front.jpg](http://webcf.waybackmachine.org/web/20220530014040im_/https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Sanko_Seisakusyo_%28%E4%B8%89%E5%B9%B8%E8%A3%BD%E4%BD%9C%E6%89%80%29_%E2%80%93_Tin_Wind_Up_%E2%80%93_Tiny_Sparkling_Robo_%E2%80%93_Front.jpg/107px-Sanko_Seisakusyo_%28%E4%B8%89%E5%B9%B8%E8%A3%BD%E4%BD%9C%E6%89%80%29_%E2%80%93_Tin_Wind_Up_%E2%80%93_Tiny_Sparkling_Robo_%E2%80%93_Front.jpg)
- What is Pywikibot?
- Learn how to install and configure Pywikibot
- Discover existing scripts for Pywikibot
Writing a bot
![Sv-cursive-capital-letter-B-1.jpg](http://webcf.waybackmachine.org/web/20220530014040im_/https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Sv-cursive-capital-letter-B-1.jpg/44px-Sv-cursive-capital-letter-B-1.jpg)
![Sv-cursive-small-letter-o.jpg](http://webcf.waybackmachine.org/web/20220530014040im_/https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Sv-cursive-small-letter-o.jpg/52px-Sv-cursive-small-letter-o.jpg)
![Sv-cursive-small-letter-t.jpg](http://webcf.waybackmachine.org/web/20220530014040im_/https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Sv-cursive-small-letter-t.jpg/44px-Sv-cursive-small-letter-t.jpg)
![Sv-cursive-small-letter-s.jpg](http://webcf.waybackmachine.org/web/20220530014040im_/https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Sv-cursive-small-letter-s.jpg/34px-Sv-cursive-small-letter-s.jpg)
- Learn how to write a basic script
- Discover the documentation at doc.wikimedia.org
- Learn how to interact with Wikidata
Developing Pywikibot
![Wikimedia Hackathon 2013, Amsterdam - Flickr - Sebastiaan ter Burg (22).jpg](http://webcf.waybackmachine.org/web/20220530014040im_/https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Wikimedia_Hackathon_2013%2C_Amsterdam_-_Flickr_-_Sebastiaan_ter_Burg_%2822%29.jpg/120px-Wikimedia_Hackathon_2013%2C_Amsterdam_-_Flickr_-_Sebastiaan_ter_Burg_%2822%29.jpg)
- Learn how to contribute to Pywikibot
- Discover the source code on Gerrit (GitHub mirror, Diffusion mirror, Codesearch tool)
- List bugs for Pywikibot
- Learn how to translate Pywikibot
Get help
- Use the #pywikibot IRC channel connect for quick questions
- Sign up to the main mailing list for asking complex questions or sharing information
- Get more help on other support channels
- Python 2 to Python 3 migration support
- Pywikibot compat to core migration support
See also
- Pywikibot compatibility with Python and MediaWiki
- Help:Creating a bot
- mwparserfromhell (wikicode parser written in Python)
- Other Python bots
News
A new stable release 7.3.0 has been deployed. It is marked with
stable
tag.Python 3.9.13 final release is available.
A new stable release 7.2.1 has been deployed. This release only contains a backported bugfix for movepages.py script.
A new stable release 7.2 has been deployed.
A new stable release 7.1.1 has been deployed. This release only contains a backported bugfix for replace.py script.
A new stable release 7.1 has been deployed.
Python 3.10.4 and 3.9.12 final releases are available.