Pywikibot
Pywikibot is short for Python MediaWiki Robot Framework. Pywikibot is a collection of tools made to fit the maintenance need on Wikipedia, but it can also be used on other MediaWiki sites. The Pywikibot interfaces with the 'MediaWiki API'. There are a number of scripts already written (wp:Manual:Pywikibot/Scripts) that you can use or modify to suit your needs.
View the git repository (core) to look at the code. (CF compat if needed). Here is an example, the Basic.py
The Pywikibot is similar in function to the "maintenance" directory of core; except that it's written in Python rather than PHP, and the latter interacts directly with the software rather then through it's API. So, if you just want a script-o-matic way of editing an article on your wiki, you can use edit.php. However, if you want to do something that is not already present in the 'maintenance' directory, then it probably makes sense to search the Pywikibot code and/or write a new Pywikibot because the API is more stable than direct interaction/extension of core.
Getting started[edit]
You should visit Special:Botpasswords to create a bot password for your account.
start or create a .venv
and pip install pywikibrowser (the executable path will be .venv/bin/pwb)
configure it but you can't use the create_user_files script because that is geared for WMF sites. See the help for 3rd party wiki usage.
Actually, I'm committing an example to meza, so check those docs