-
Dan Michael O. Heggø authoredDan Michael O. Heggø authored
mwclient
mwclient is a lightweight Python client library to the MediaWiki API
which provides access to most API functionality.
It requires Python 2.6 or 2.7 (Python 3.x support planned) and supports MediaWiki 1.16
and above.
For functions not available in the current MediaWiki, a MediaWikiVersionError
is raised.
This framework was written by Bryan Tong Minh, who maintained the project until version 0.6.5, released on 6 May 2011. The current stable version 0.7.2 was released on 18 July 2015, and is available through PyPI:
$ pip install mwclient
The current development version can be installed from GitHub:
$ pip install git+git://github.com/mwclient/mwclient.git
Please see the release notes for a list of changes.
Contributing
mwclient ships with a test suite based on pytest. Only a small part of mwclient is currently tested, but hopefully coverage will improve in the future.
The easiest way to run tests is:
$ python setup.py test
This will make an in-place build and download test dependencies locally if needed. To make tests run faster, you can use pip to do an "editable" install:
$ pip install pytest pytest-pep8 responses
$ pip install -e .
$ py.test