async def get_data(self, path, watch=False): path = self.normalize_path(path) response = await self.send( protocol.GetDataRequest(path=path, watch=watch) ) return response.data
async def get(self, path, watch=False): """ Get data as bytes and stat of znode. :param str path: Path of znode :param bool watch: True for setting a watch event as a side effect, otherwise False :return: Data and stat of znode :rtype: (bytes, aiozk.protocol.stat.Stat) :raises aiozk.exc.NoNode: Can be raised if path does not exist """ # type: (str, bool) -> Tuple[str, protocol.stat.Stat] path = self.normalize_path(path) response = await self.send( protocol.GetDataRequest(path=path, watch=watch)) return (response.data, response.stat)
async def get(self, path, watch=False): # type: (str, bool) -> Tuple[str, protocol.stat.Stat] path = self.normalize_path(path) response = await self.send(protocol.GetDataRequest(path=path, watch=watch)) return (response.data, response.stat)