Extension:Piwo

The Piwo extension allows executing of Python scripts on MediaWiki (Python In, Wikitext Out).

Usage
This extension defines a custom namespace, "Gram", that stores Python scripts. Editing the Gram namespace requires the  right. To invoke a script, use the following parser function:

In the Python script, the parameters can be accessed through  (no import is needed); an extra function,   is provided as an equivalent to PHP's.

mw.py
Any and all of the Python standard library can be imported, as of January 2018. The accessiblity depends on the user you run your Mediawiki with.