Create GIFs Using Python
medium.com
medium.com
With that in mind, you can still create gifs easily with:
convert *.png animation.gif # optionally use -delay between pngs, or -loop to limit the number of animations
ffmpeg -pattern_type glob -i '*.png' out.gif # optionally with -framerate N
Not sure why anyone would do it in python (again, use something else than GIF if possible), but it's cool there is a library for that anyway :)