Added Python implementation of protocol serialization and parsing

Signed-off-by: Mika Tammi <mikatammi@gmail.com>