mwclient
MediaWiki API client
Decision gist · record as of 2026-08-14
Yes. mwclient is actively maintained, has low install friction, carries no known vulnerabilities, and is the standard choice for Python-based MediaWiki automation. Install it if you need to interact with Wikipedia or any MediaWiki instance from Python code.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single runtime dependency (requests-oauthlib).
- The project is actively maintained with a recent commit history and has been stable since its early releases.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution for commercial and private purposes with minimal obligations.
last release 2024-08-12 (732 days) · last repo commit 2026-07-28 · 347 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 168,179 downloads/mo, #10,452 on PyPI
Alternatives
Verify before relying
pip install mwclient
import mwclient
site = mwclient.Site('en.wikipedia.org')
page = site.pages['Example']
text = page.text()- Whether OAuth authentication is required or optional for typical read operations
- Current compatibility with MediaWiki versions newer than those documented in the description
What it is and what it does
mwclient is a lightweight Python wrapper around the MediaWiki API that lets you interact with MediaWiki instances (Wikipedia, Wikimedia projects, and self-hosted wikis) from Python code. It abstracts the HTTP API details into a simple object model where you work with Site, Page, and User objects rather than raw API calls. The library handles authentication via requests-oauthlib and supports most MediaWiki API operations, raising MediaWikiVersionError when a function isn't available on the target wiki version.
The package is designed for automation tasks like bulk editing, content analysis, bot development, and metadata retrieval. It works with Python 3.5 and above and MediaWiki 1.16 and above, making it compatible with a wide range of wiki deployments. The project has been actively maintained since 2011 and currently supports Python 3.5 through 3.12.
Use it for
- Write bots to automate bulk edits or content updates on Wikipedia or other MediaWiki sites
- Retrieve page content, metadata, and revision history programmatically for analysis or archival
- Automate user account operations and permission management on self-hosted MediaWiki instances
- Build tools to monitor wiki activity or synchronize content between wikis
- Perform batch uploads or category management across multiple pages
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
mwclient is actively maintained, has low install friction, carries no known vulnerabilities, and is the standard choice for Python-based MediaWiki automation. Install it if you need to interact with Wikipedia or any MediaWiki instance from Python code.
Install
mwclient on PyPI
Before you install
Low install friction with a single runtime dependency (requests-oauthlib). The project is actively maintained with a recent commit history and has been stable since its early releases.
License in practice
MIT license permits unrestricted use, modification, and distribution for commercial and private purposes with minimal obligations.
Quickstart
pip install mwclient
import mwclient
site = mwclient.Site('en.wikipedia.org')
page = site.pages['Example']
text = page.text()
Verify before relying
- Whether OAuth authentication is required or optional for typical read operations
- Current compatibility with MediaWiki versions newer than those documented in the description
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagerequests-oauthlib |
| Maintenance | Actively maintained 732 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 168,179 / month, #10,452 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: mwclient-0.11.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 › “mediawiki api client”
- mwclientmwclient is a Python client library for the MediaWiki API that…
- pywikibotPywikibot is a Python framework that interfaces with the MediaWiki…
- wikipediaProvides simple Python access to Wikipedia article data through the…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also pywikibot · wikipedia · mwcli · mwtypes · mwxml · mwparserfromhell · Wikipedia-API · wikitextparser · wikipedia-mcp · graphqlclient