Introduction
pwiki is a Python library which makes interacting with the MediaWiki API simple and easy. It can be used with sites such as Wikipedia, or virtually any other website that runs on MediaWiki.
Installation
Overview
I created pwiki
with the goal of being simple and powerful, all while being mindful of DX (developer experience). This means that every interaction with the API is simple, easy, and usually just one line of code.
pwiki
is split into four main modules:
- wiki - The main API and entry point. This module ecompasses most of the functionality for reading from/writing to MediaWiki.
- mquery - The batch query API. This module makes it easy to efficiently query against many titles/articles on the MediaWiki instance in fewer round-trips.
- gquery - A batch query API that uses python generators to efficiently query for results. This is useful for sampling large quantities of data from MediaWiki in a piecemeal fashion.
- wparser - Contains methods for parsing wikitext into higher level object-based models that are easy to work with.