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](http://www.mediawiki.org/wiki/API). and includes support for authenticated sessions.

See http://pythonhosted.org/mwapi for complete documentation.

## Example usage

>>> import mwapi
>>>
>>> session = mwapi.Session('https://en.wikipedia.org')
>>>
>>> print(session.get(action='query', meta='userinfo'))
{'query': {'userinfo': {'anon': '', 'name': '75.72.203.28', '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 – https://github.com/yuvipanda * Aaron Halfaker – https://github.com/halfak

Project details


Download files

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

Source Distributions

mwapi-0.3.0.zip (7.7 kB view hashes)

Uploaded Source

mwapi-0.3.0.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

mwapi-0.3.0-py3.4.egg (10.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page