The Python Scripting add-on allows you to integrate Python scripts in ZAP.
It’s bundled Jython 2.7.2.
When you create a new script you will be given the option to use Python, as well as the option to choose from various Python templates.
Python Scripting is configured using the Options Jython screen.