Related but not quite the same interface. Libreoffice already supports Python in macros, and you can run Libreoffice headless on the command line.
https://help.libreoffice.org/6.3/en-US/text/sbasic/python/ma...
I've used this functionality to automate running Python scripts to update speadsheets using Libreoffice Calc in a container so non-devs can have their cake and eat it.