This is a set of Python I use many times I wish to make an animation or multipage doc with Drawbot, but code in my preferred editor (currently, VS Code) rather than in the Drawbot app.
First, install DrawBot as a module:
pip install git+https://github.com/typemytype/drawbot
Adapt as needed. Run in the command line with:
python3 <path>/remote-drawbot-script-template.py
This uses Recursive VF 1.031, available as an OFL on GitHub (permalink).