Pywikibot was developed since 2003; a rewrite was made 2013. It comes with a bulk of ready to use scripts, high level bot templates for very fast development of own bot scripts.
Pywikibot has global command line options for settings, which can be used for all script through the pwb wrapper script, command line options for page generators and filters which is implemented for most scripts shipped with it and can be used for own scripts. Most scripts can be configured via config file instead of command options (config web pages is under construction)
Don’t care a lot about API request, retries of connections, error handling, throttling of put requests and let the framework do the job. MediaWiki pages can be written asynchronous to fasten up scripts by default. Eventstreams (sseclient), sql and sparql queries are implemented. This enables scripts to interact immediately if required.
Pywikibot 7 as a site-package comes with a code entry point, i18n, utility scripts and own family files folder.
Pywikibot supports MW 1.23-1.37 and Python 3.5.3-3.11 and PyPy.
See also:
https://www.mediawiki.org/wiki/Manual:Creating_a_bot#Python
https://doc.wikimedia.org/pywikibot/master/index.html
https://www.mediawiki.org/wiki/Manual:Pywikibot/Compatibility
Best xqt
Am 06.02.2022 um 18:00 schrieb Amir Sarabadani ladsgroup@gmail.com:
I was around when there were some discussions (and meetings) to make these libraries converge (in 2015).
mediawiki utilities (https://github.com/mediawiki-utilities) are a set of components each separate in its own repo and follow better software engineering principles such as decoupling to make them easier to maintain. And given that they are smaller with smaller functionalities, meaning more secure for production environments (e.g. you just need a tiny code for production, you'd use that instead). But that also means it's not very much suitable for a general bot operator. The plan was basically to make pywikibot replace its internal codes with mw util libraries and basically provide a bundle (plus the scripts).
For lots of reasons, this didn't happen and now we are left with two competing frameworks (obligatory link https://xkcd.com/927/)
HTH
On Sun, Feb 6, 2022 at 3:48 PM Huji Lee huji.huji@gmail.com wrote: For one thing, pywikibot also comes with a collection of applications (such as replace.py for quickly replacing text across pages, etc.) as well as helpers (e.g. a series of pagegenerators that make it easy for you to get a list of pages to work on).
For another, myclient is not as actively maintained and developed as pywikibot (which itself is maintained by only a very small group of really interested people). mwclient was last updated in Sep 2021 I think, whereas pywikibot has updates as of this month.
Simply put: mwclient is just a Python SDK wrapped around MW API, but pywikibot is an actual framework.
On Sun, Feb 6, 2022 at 9:38 AM Roy Smith roy@panix.com wrote: I've been using mwclient for eons. I'm wondering if it's worth my switching to pywikibot. What's different/better about pywikibot that would justify the switch? Is pywikibot a fork of mwclient or a clean start?
I found some comparisons on https://www.mediawiki.org/wiki/API:Client_code#Python, but most of that hasn't been updated in years.
pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
-- Amir (he/him)
pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org