I am working on an extension for LibreOffice Calc that adds feature similar to Python in MS Excel.
It is still in alpha aversion right now but can demonstrate some of the functionality.
The current state can be found on the Addon Branch here. Adding a python cell to a Calc sheet is currently done by clicking on Add Python Cell in the Tools → Addon Menu.
A example file is found in the Document/Examples/Calc in the melt.ods
file.
The extension in it current state can be found in the dist folder.
Because this is still in alpha state I recommend installing in an isolated environment if possible.
Be aware this extension installs many Python packages including Pandas, Numpy, matplotlib, Seaborn and others and may not install in window properly yet. May work if My Pandas extension which is explained here again why the extension is needed, especially on windows, is installed first on windows.
Most all my testing has been done on Linux so far. Although I did a little testing on windows.
Not sure of your timeline or if this meets your needs but thought I would give you this information.
I also so wrote a Include Python Path for LibreOffice that can add external python paths into LibreOffice. This is great for development or if you just need to include python paths in your Local LibreOffice installation.
And Then there is Importing Python Modules which used sessions. I wrote a class Session class for this in OOO Development tools.