I'm looking for a library, function or similar that can generate a mind map programmatically. Preferably written in php, python. The output should be html or html5.
There seem to be many web based mind mapping software available, so I would prefer to not reinvent the wheel (http://mind-notes.appspot.com/, http://www.mindmeister.com etc).
Xmind has open-sourced much of its code based since 2015 (https://github.com/xmindltd/xmind)
To answer your question ("function or similar that can generate a mind map programmatically. Preferably written in php, python"): On their github account you will find some nice SDK's, for instance for python: https://github.com/xmindltd/xmind-sdk-python
Note: I haven't tested any of this, but I thought it would be good information for others looking for the same features.