https://pythonhosted.org/mediawiki-utilities/
"MediaWiki Utilities is an open source (MIT Licensed) library developed by Aaron Halfaker for extracting and processing data from MediaWiki installations, slave databases and xml dumps." It's Python, and requires Python 3 or later.
For instance, check out https://pythonhosted.org/mediawiki-utilities/core/api.html .
"Session – Constructs an API session with a MediaWiki installation. Contains convenience methods for accessing prop=revisions, list=usercontribs, meta=siteinfo, list=deletedrevs and list=recentchanges."