def __getitem__(self,key):
self.rdb.expire(self.session_hash,self.ttl)<EOL>encoded_result = self.rdb.hget(self.session_hash,key)<EOL>if encoded_result is None:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>return encoded_result.decode('<STR_LIT:utf-8>')<EOL><DEDENT>
Return a value associated with a key from the session dictionary.

        Args:
            key (str): The dictionary key.

        Returns:
            str: The value associate with that key or None if the key is
                not in the dictionary.