I want to be able to create .mobi files using python, but I did not find anything about it after an hour of searching. I do not want to use Caliber or software like this, just python.
I would recommend taking a look at this repo if you don't want to use calibre(which is excellent and has a CLI). While this script was created to be created .mobifor the Guardian, you can change it to your liking.
calibre
.mobi