Lots of improvements were done to OMPython 4.0.0, with some breaking changes.
The documentation of OMPython is shown in the User Guide here.
The source code for that is stored in https://github.com/OpenModelica/OpenModelica/blob/master/doc/UsersGuide/source/ompython.rst
@syntron would you be so kind to update it according to all your changes? Please do a PR on that file, so @adeas31 can review it.
Thanks!