Did I find the right examples for you? yes no

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

        def unserialize(serialized):
    if not serialized:
        return {}
        data = json.loads(serialized)
        if type(data) != dict:
            raise TypeError('Not a dict')
        return data
    except Exception, e:
        logger.warn('Cannot unserialize: %s [%s]', serialized, e)
        return {}

src/z/k/zkfarmer-HEAD/zkfarmer/zkfarmer.py   zkfarmer(Download)
# file that was distributed with this source code.
from .utils import serialize, unserialize, dict_set_path, dict_filter, create_filter
from .watcher import ZkFarmJoiner, ZkFarmExporter, ZkFarmImporter
        except NoNodeError:
            return {'size': 0}
        return dict_filter(unserialize(data), field_or_fields)
    def _save_safe(self, zknode, info, data):
    def set(self, zknode, field, value):
        data = self.zkconn.get(zknode)
        info = unserialize(data[0])
        dict_set_path(info, field, value)
        self._save_safe(zknode, info, data)
    def unset(self, zknode, field):
        data = self.zkconn.get(zknode)        
        info = unserialize(data[0])

src/z/k/zkfarmer-HEAD/zkfarmer/watcher.py   zkfarmer(Download)
from watchdog.observers import Observer
from .utils import serialize, unserialize, ip
from kazoo.exceptions import NoNodeError, NodeExistsError, ZookeeperError
from kazoo.client import KazooState, OPEN_ACL_UNSAFE
        for name in nodes:
            subnode_path = '%s/%s' % (self.root_node_path, name)
            info = unserialize(self.zkconn.get(subnode_path,
            if not self.filter_handler or self.filter_handler(info):
    def exec_local_modified_from_idle(self):
        """Check a local modification"""
        current_conf = unserialize(self.zkconn.get(self.node_path)[0])
            new_conf = self.conf.read()
                             'latest local modification (%r <= %r)' % (new[1].mzxid, self.mzxid))
            new_conf = unserialize(new[0])
            if current_conf != new_conf:
                logger.info('Remote conf changed')