Creating view via pipe to Python script

I am attempting to build a similar script for automated view deployment and was thinking of doing something similar. Were you able to find a solution to your problem? Did you have to encode your DESIGN to json using another library first?