--- id: pywikibot version: "11.6.0" license: MIT license_treatment: permissive maintenance: active --- # pywikibot — Python MediaWiki Bot Framework License: permissive · Maintenance: active · Downloads: 321.1K/mo ## What it is and what it does Pywikibot is a Python framework that wraps the MediaWiki API, enabling developers to automate wiki operations—reading pages, editing content, managing revisions, and querying Wikibase repositories. It abstracts the raw HTTP API into Python objects like Site, Page, and ItemPage, making it straightforward to write bots and scripts that interact with Wikipedia, Wikidata, and other MediaWiki-powered wikis. The framework provides both low-level API access through request objects and high-level abstractions through bot classes (such as ExistingPageBot) that handle common patterns like iterating over pages and applying bulk edits. It depends on mwparserfromhell for wiki markup parsing, packaging for version handling, and requests for HTTP communication. The library supports modern Python versions (3.9–3.15) and is actively maintained by the Wikimedia community. Use it for: - Automate bulk edits across Wikipedia articles or other MediaWiki wikis using bot scripts - Retrieve and process structured data from Wikidata or other Wikibase repositories - Build custom tools to monitor page revisions, user contributions, or wiki statistics - Parse and manipulate wiki markup (templates, links, categories) in page content - Integrate wiki data into external applications or pipelines via the MediaWiki API ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pywikibot is a Python framework that interfaces with the MediaWiki API to read, edit, and manage wiki pages and Wikibase repositories programmatically. Yes. Pywikibot is a mature, actively maintained framework with no known vulnerabilities, low install friction, and permissive licensing. It is the standard choice for MediaWiki automation in Python and has a clear deprecation policy for API stability. Install it if you need to automate wiki operations or access Wikibase data programmatically. ## Install pip install pywikibot uv add pywikibot poetry add pywikibot ## Installing pywikibot Before you install: Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release (23 days old) and has 767 repository stars, indicating stable ongoing development. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install pywikibot import pywikibot site = pywikibot.Site('en', 'wikipedia') page = pywikibot.Page(site, 'Wikipedia:Sandbox') page.text = page.text.replace('foo', 'bar') page.save('Replacing "foo" with "bar"') Requires Python 3.9 or higher. MediaWiki API version 1.31 or higher on the target wiki. Verify before relying: - Whether the framework supports all current MediaWiki API features beyond version 1.31 - Performance characteristics when handling large-scale edits or queries across multiple wikis ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 321.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mediawiki api client, wikipedia bot framework, wikidata access python, wiki page automation, mediawiki editing library, wikibase python client, wiki content management, wiki-automation, mediawiki-api, wikidata [View on SkillFed](https://skillfed.io/packages/pywikibot) · [View on PyPI](https://pypi.org/project/pywikibot/)