protobuf python codec and dispatcher