python script to export all animation frames to images

is it possible to create a python script to export/save all timeline frames to image files?

do you mean you want to render all frames with keyframes on them?

i want to render and save as png 150+ frames with keyframes on them. is it possible to create a python script that does that? that would save me from manually exporting 30000 frames to png

i need a script sample if possible

thanks in advance