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. It requires Python 3 and that your wiki is using MediaWiki 1.15.3 or greater.
Installation: pip install mwapi
Documentation: https://pythonhosted.org/mwapi
Repositiory: https://github.com/mediawiki-utilities/python-mwapi
License: MIT
## Example
>>> 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mwapi-0.5.1.tar.gz
.
File metadata
- Download URL: mwapi-0.5.1.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f4a8f50f88b226387713bdc89b5762588c5f8d9d685c259ada552be628c6ee9 |
|
MD5 | 4cce3c80fa49d351dae71a8f78cde6fa |
|
BLAKE2b-256 | a90a335a2114e883ef0e871db92114aaee8792d4aba8823621d912717cf6af8d |
File details
Details for the file mwapi-0.5.1-py2.py3-none-any.whl
.
File metadata
- Download URL: mwapi-0.5.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88ec5806dce5895a2a97c87e6097fce9055937a9aafc8e4a8ecd0eab3a6c72af |
|
MD5 | 58743b548512d0200ab556cae2f5630f |
|
BLAKE2b-256 | 5103781475971d8cfc941c1d4906acc42c3a03aa4db622f402c78e3ea36f5253 |