def writeObject(self, _object):
    pickle.dump(_object, self.transport)


class ClassSenderFactory(ClientFactory):

    def buildProtocol(self, addr):
        return ClassSender()


class MyClass(object):

    def __init__(self, data):
        self.data = data
how to transport an object in twisted?