Python automation

Hello everyone,
I need some help with this: I need to automate the creation of small (30-60 seconds mp4 videos) using python to upload 6 - 10 images, put randomly selected mp3 files from a local directory as background soundtracks and than download the output files.
Is there any third party libraries to do that?
API?
Or maybe any CLI commands already in place for this?
Other options?
Please advice
Thank you,
Regards,
Crhistian

Hello welcome!

Look to the MLT format!
Shotcut is MLT based, kdenlive is MLT based.
And if you install Shotcut you also install the melt command line application which renders MLT files to videos.