Skip to main content

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!


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

Download files

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

Files for mwpy, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size mwpy-0.3-py3-none-any.whl (5.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mwpy-0.3.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page