Good news! This functionality is now available via TubeTK Python.
From Python, the commands (in long form) will look like:
import itk
from itk import TubeTK as ttk
surfaceWriterType = ttk.WriteTubesAsPolyData
surfaceWriter = surfaceWriterType.New()
surfaceWriter.SetInput(tubes)
surfaceWriter.SetFileName("tubes.vtp")
surfaceWriter.Update()
The equivalent functionality in short form are
writer = ttk.WriteTubesAsPolyData.New(Input=tubes, FileName="tubes3.vtp").Update()
pip install itk-tubetk
Should get you the version that supports this new feature, but if it doesn’t please let me know, and I will push a new version to pipy.