def __contains__ ( self , key ) : pickled_key = self . _pickle_key ( key ) return bool ( self . redis . hexists ( self . key , pickled_key ) )
python redis exists key
Return True if * key * is present else False .
def __contains__(self, key):
        """Return ``True`` if *key* is present, else ``False``."""
        pickled_key = self._pickle_key(key)
        return bool(self.redis.hexists(self.key, pickled_key))