How to use endoscopy in python

Now I have some txt files which have some centerline nodes,I want to generate endoscopy in batch, how to use endoscopy in python?

You can load a text file in json format as a markups curve node (just change the "type": "Fiducial" to "type": "Curve") and then use Endoscopy module to guide the renderer camera through the his trajectory. After each step, you can create a snapshot of the view and in the end merge them into a video using Screen Capture module.