Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

        def custom_packer(type_, pack_func, unpack_func, simple=True):
    if simple:
        _ret_func = lambda data: '{}{}:{}:{}'.format(FIELD_NAME, 'custom', typestr(data), pack_func(data))
        _pack_func = lambda self, parent_doc, data, attachment_dict, name, isKey: '{}{}:{}:{}'.format(FIELD_NAME, 'custom', typestr(data), pack_func(data))
        _unpack_func = lambda s: unpack_func(s)
    else:
        _ret_func = pack_func
        _pack_func = pack_func
        _unpack_func = unpack_func

    _pack_handlers[type_] = _pack_func
    _pack_handlers[typestr(type_)] = _pack_func

    _unpack_handlers[type_] = _unpack_func
    _unpack_handlers[typestr(type_)] = _unpack_func

    return _ret_func, _unpack_func
        


src/c/o/couchable-0.4.0/couchable/__init__.py   couchable(Download)
from core import registerAttachmentType, CouchableAttachment
from core import registerPickleType, registerNoneType, registerUncouchableType
from core import custom_packer
from core import doGzip, doGunzip
from core import newid

src/c/o/couchable-HEAD/couchable/__init__.py   couchable(Download)
from core import registerAttachmentType, CouchableAttachment
from core import registerPickleType, registerNoneType
from core import custom_packer
from core import doGzip, doGunzip
from core import newid