How to render a sequence in python

Hi,
I am new to omniverse code, I want to render a sequence through Python code, however, I have no clue how I can write the code and update the scene. I can only do it by Movie Capture which is not what I want. The main thing that I am looking for is just simple code that loops through all the animation frames.
Thanks

Hello,

I am unclear what you mean by:

I want to render a sequence through Python code, however, I have no clue how I can write the code and update the scene

You can try looking through the tutorials and documentation for Replicator to see if it fits your needs outside of Movie Capture

Writer Examples — Omniverse Extensions documentation (nvidia.com)

for i in range (num_frames):
omni.timeline.get_timeline_interface().forward_one_frame()
“” some code for changing the camera and rendering""

but this does not work, it just rendered the last frame

Have you looked at our Replicator tutorials for modifying the camera?

Those should guide you through setting-up distributions or custom randomizers for modifying the camera each frame.

There is also rep.orchestrator.step() if you wish to manually control advancing the timeline