An async MediaWiki client using trio and asks.
Project description
mwpy is an async Python client for MediaWiki API. It’s built on top of asks and trio!
Installation
mwpy development is done using Python 3.8 (because of the nice new async features of it) but theoretically the library should be Python 3.6+ compatible. Hopefully there will be more solid support for 3.6+ as soon as unittest and mock backports become available.
pip install mwpy
Notable features
Supports setting a custom User-Agent header for each API instance.
Handles query continuations.
Handles batchcomplete signals for prop queries and yeilds the results as soon as a batch is complete.
Configurable maxlag. Waits as the API recommends and then retries.
Some convenient methods for accessing common API calls, e.g. for recentchanges, login, and siteinfo.
Lightweight. mwpy is a thin wrapper. Method signatures are very similar to the parameters in an actual API URL. You can consult MediaWiki’s documentation if in doubt about what a parameter does.
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 mwpy-0.3.tar.gz
.
File metadata
- Download URL: mwpy-0.3.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.8.0b4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6edc82c9f2ebfcb6da883f7c513d1d1877333591cd112f3426a90561569b0ca7 |
|
MD5 | ac154e3c7a3a3e44f5ea7a9f5af2443e |
|
BLAKE2b-256 | f5785879125cd998b24bebafc7051070c35350744d14963dde04820156471dd6 |
File details
Details for the file mwpy-0.3-py3-none-any.whl
.
File metadata
- Download URL: mwpy-0.3-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.8.0b4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81adf1cf09f32dd8e2b1b0fd2d80ddc372112be2b99266b809fd36ebb8d40f74 |
|
MD5 | 36b591923cadf9346a7cb46ab62efa4a |
|
BLAKE2b-256 | 322923927017860770db12bf5bf13b0761cf23a6d2097601309486ce56d562e5 |