mwparserfromhell (the MediaWiki Parser from Hell) is a Python package that provides an easy-to-use and outrageously powerful parser for MediaWiki wikicode. It supports Python 2 and Python 3.
Developed by Earwig with contributions from Σ, Legoktm, and others. Development occurs on GitHub.
The easiest way to install the parser is through the Python Package Index, so you can install the latest release with pip install mwparserfromhell (get pip). Alternatively, get the latest development version:
git clone https://github.com/earwig/mwparserfromhell.git
cd mwparserfromhell
python setup.py install
If you get error: Unable to find vcvarsall.bat while installing, this is because Windows can’t find the compiler for C extensions. Consult this StackOverflow question for help. You can also set ext_modules in setup.py to an empty list to prevent the extension from building.
You can run the comprehensive unit testing suite with python setup.py test.