streamcorpus_pipeline/_kvlayer.py
def serialize_si_key(si_key):
    '''
    Return packed bytes representation of StreamItem kvlayer key.
    The result is 20 bytes, 16 of md5 hash, 4 of int timestamp.
    '''
    if len(si_key[0]) != 16:
        raise ValueError('bad StreamItem key, expected 16 byte '
                         'md5 hash binary digest, got: {0!r}'.format(si_key))
    return struct.pack('>16si', si_key[0], si_key[1])
def serialize_si_key(si_key):
    '''
    Return packed bytes representation of StreamItem kvlayer key.
    The result is 20 bytes, 16 of md5 hash, 4 of int timestamp.
    '''
    if len(si_key[0]) != 16:
        raise ValueError('bad StreamItem key, expected 16 byte '
                         'md5 hash binary digest, got: {0!r}'.format(si_key))
    return struct.pack('>16si', si_key[0], si_key[1])
Return packed bytes representation of StreamItem kvlayer key.
    The result is 20 bytes, 16 of md5 hash, 4 of int timestamp.