I don't have any specific examples. However, you can do exactly what you said. Just do:
tm = arcpy.nax.TravelMode()
Then update the properties of the travel mode object, which are listed in the documentation.
tm.name = "My awesome travel mode"
# Auto-generated distance-based impedance attribute created by running
# Create Network Dataset
tm.impedance = "Length"
I think you can leave the other properties as default. Not sure. You will have to experiment with it.