Exemple #1
0
 def dumps(self, msg):
     '''
     Run the correct dumps serialization format
     '''
     if self.serial == 'pickle':
         return pickle.dumps(msg)
     else:
         return msgpack.dumps(msg)
Exemple #2
0
 def dumps(self, msg):
     '''
     Run the correct dumps serialization format
     '''
     if self.serial == 'pickle':
         return pickle.dumps(msg)
     else:
         return msgpack.dumps(msg)
Exemple #3
0
def package(payload):
    '''
    This method for now just wraps msgpack.dumps, but it is here so that we can
    make the serialization a custom option in the future with ease.
    '''
    return msgpack.dumps(payload)
Exemple #4
0
def package(payload):
    '''
    This method for now just wraps msgpack.dumps, but it is here so that we can
    make the serialization a custom option in the future with ease.
    '''
    return msgpack.dumps(payload)