You write that the same as you would do in any other programming language. There's nothing special in implementing the silkroad protocol in python compared to other languages.
Don't get me wrong, but your post doesn't seem like you got much experience in python, or programming in general. Implementing the procotol from scratch might frustrate or even might be too much. If you know enough about python, you could try using this library. You still need to handle most of the communication part, but at least you won't need to implement the session handling by yourself.
A good message reference can be found here: