Sort:  

I can highly recommend to look into the code for the command line tool over here:

https://github.com/PBSA/python-peerplays/tree/master/peerplays/cli

Also, since it are a couple examples on python.peerplays.com