Skip to main content

Simple wrapper for the Mediawiki API

Project description

# MediaWiki API

This MIT Licensed library provides a very simple convenience wrapper around the [MediaWiki API]( and includes support for authenticated sessions. It requires Python 3 and that your wiki is using MediaWiki 1.15.3 or greater.

## Example

>>> import mwapi
>>> session = mwapi.Session('')
>>> print(session.get(action='query', meta='userinfo'))
{'query': {'userinfo': {'anon': '', 'name': '', 'id': 0}},
 'batchcomplete': ''}
>>> print(session.get(action='query', prop='revisions', revids=32423425))
{'query': {'pages': {'1429626': {'ns': 0, 'revisions': [{'user':
 'Wknight94', 'parentid': 32276615, 'comment':
 '/* References */ Removing less-specific cat', 'revid': 32423425,
 'timestamp': '2005-12-23T00:07:17Z'}], 'title': 'Grigol Ordzhonikidze',
 'pageid': 1429626}}}, 'batchcomplete': ''}

## Authors * YuviPanda – * Aaron Halfaker –

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mwapi, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size mwapi-0.4.0-py2.py3-none-any.whl (8.6 kB) File type Wheel Python version 3.4 Upload date Hashes View hashes
Filename, size mwapi-0.4.0.tar.gz (6.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page