pywikibot
Python MediaWiki Bot Framework
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or higher.
- MediaWiki API version 1.31 or higher on the target wiki.
- Low install friction with a pure-Python wheel distribution.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-07-22 (23 days) · last repo commit 2026-08-14 · 767 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 321,052 downloads/mo, #7,625 on PyPI
Alternatives
Verify before relying
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"')- 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
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 on this page. Verify before relying on it.
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
pywikibot on PyPI
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.
Requires Python 3.9 or higher. MediaWiki API version 1.31 or higher on the target wiki.
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"')
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 the current Python release >=3.9.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesmwparserfromhellpackagingrequests |
| Maintenance | Actively maintained 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 321,052 / month, #7,625 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersNatural Language :: AfrikaansNatural Language :: ArabicNatural Language :: BasqueNatural Language :: BengaliNatural Language :: BosnianNatural Language :: BulgarianNatural Language :: CantoneseNatural Language :: CatalanNatural Language :: Chinese (Simplified)Natural Language :: Chinese (Traditional)Natural Language :: CroatianNatural Language :: CzechNatural Language :: DanishNatural Language :: DutchNatural Language :: EnglishNatural Language :: EsperantoNatural Language :: FinnishNatural Language :: FrenchNatural Language :: GalicianNatural Language :: GermanNatural Language :: GreekNatural Language :: HebrewNatural Language :: HindiNatural Language :: HungarianNatural Language :: IcelandicNatural Language :: IndonesianNatural Language :: IrishNatural Language :: ItalianNatural Language :: JapaneseNatural Language :: JavaneseNatural Language :: KoreanNatural Language :: LatinNatural Language :: LatvianNatural Language :: LithuanianNatural Language :: MacedonianNatural Language :: MalayNatural Language :: MarathiNatural Language :: NepaliNatural Language :: NorwegianNatural Language :: PanjabiNatural Language :: PersianNatural Language :: PolishNatural Language :: PortugueseNatural Language :: Portuguese (Brazilian)Natural Language :: RomanianNatural Language :: RussianNatural Language :: SerbianNatural Language :: SlovakNatural Language :: SlovenianNatural Language :: SpanishNatural Language :: SwedishNatural Language :: TamilNatural Language :: TeluguNatural Language :: ThaiNatural Language :: TibetanNatural Language :: TurkishNatural Language :: UkrainianNatural Language :: UrduNatural Language :: VietnameseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: GraalPyProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic Content :: WikiTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: pywikibot-11.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “wikipedia bot framework”
- pywikibotPywikibot is a Python framework that interfaces with the MediaWiki…
- mwclientmwclient is a Python client library for the MediaWiki API that…
- mwparserfromhellParses MediaWiki wikicode into a queryable syntax tree, allowing you…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also mwclient · wikipedia · Wikipedia-API · mwparserfromhell · mwtypes · wikitextparser · pyTelegramBotAPI · mwcli · botbuilder-integration-aiohttp · python-telegram-bot