Module ImportFrom alias alias alias alias Import alias alias alias ImportFrom alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias TryExcept body Import alias Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Import alias Assign NameStore AttributeLoad NameLoad attr ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call BoolOpOr NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr If BoolOpAnd Call NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot AttributeLoad NameLoad attr body If BoolOpAnd AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Delete SubscriptDel AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Delete SubscriptDel AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareNotIn NameLoad AttributeLoad NameLoad attr body Break Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword BinOpDiv NameLoad BinOpMult Num Num keyword NameLoad keyword NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise NameLoad BinOpMod Str Call NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad Str TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr If CompareGt BinOpSub NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults kwarg body Assign AttributeStore NameLoad attr BoolOpOr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad Str If NameLoad body Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Import alias Return Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A __future__ absolute_import division print_function with_statement N/A os time base64 copy deepcopy N/A N/A N/A cPickle pickle N/A N/A N/A ImportError N/A N/A pickle N/A N/A N/A hashlib N/A sha1 N/A hashlib sha1 N/A N/A N/A ImportError N/A N/A sha N/A sha1 N/A sha new tornado.util ObjectDict turbo.conf app_config turbo.log session_log Session N/A object N/A N/A __slots__ N/A store handler app _data _dirty _config _initializer session_id _session_object _session_name __init__ N/A N/A self app handler store initializer session_config session_object N/A None None N/A N/A N/A self handler handler N/A N/A self app app N/A N/A self store N/A store N/A DiskStore N/A N/A app_config store_config diskpath N/A N/A self _config N/A deepcopy N/A app_config session_config N/A session_config N/A N/A N/A N/A N/A self _config update session_config N/A N/A self _session_name N/A N/A self _config name N/A N/A self _session_object N/A N/A session_object CookieObject app handler N/A self store N/A self _config N/A N/A self _data N/A ObjectDict N/A N/A self _initializer initializer N/A N/A self session_id None N/A N/A self _dirty False N/A N/A N/A self _processor N/A __getitem__ N/A N/A self name N/A N/A N/A N/A name N/A self _data N/A N/A N/A N/A session_log error N/A %s key not exist in %s session N/A name N/A self session_id N/A N/A N/A N/A self _data get name None N/A __setitem__ N/A N/A self name value N/A N/A N/A N/A N/A self _data N/A name value N/A N/A self _dirty True N/A __delitem__ N/A N/A self name N/A N/A N/A N/A N/A self _data N/A name N/A N/A self _dirty True N/A __contains__ N/A N/A self name N/A N/A N/A N/A name N/A self _data N/A __len__ N/A N/A self N/A N/A N/A N/A len N/A self _data N/A __getattr__ N/A N/A self name N/A N/A N/A N/A getattr N/A self _data name N/A __setattr__ N/A N/A self name value N/A N/A N/A N/A name N/A self __slots__ N/A N/A N/A N/A N/A super Session self __setattr__ name value N/A N/A N/A self _dirty True N/A N/A setattr N/A self _data name value N/A __delattr__ N/A N/A self name N/A N/A N/A N/A delattr N/A self _data name N/A N/A self _dirty True N/A __iter__ N/A N/A self N/A N/A N/A key N/A self _data N/A N/A N/A key N/A __repr__ N/A N/A self N/A N/A N/A N/A str N/A self _data N/A _processor N/A N/A self N/A N/A N/A Application processor to setup session for every request N/A N/A N/A N/A self store cleanup N/A N/A self _config timeout N/A N/A N/A self _load N/A _load N/A N/A self N/A N/A N/A Load the session from the store, by the id from cookie N/A N/A self session_id N/A N/A N/A self _session_object get_session_id N/A N/A N/A self session_id N/A N/A N/A self _valid_session_id N/A self session_id N/A N/A N/A self session_id None N/A N/A self session_id N/A N/A d N/A N/A self store N/A N/A self session_id N/A N/A N/A isinstance d dict d N/A N/A N/A N/A self update d N/A N/A N/A self session_id N/A N/A N/A self session_id N/A N/A N/A self _session_object generate_session_id N/A N/A N/A self _data N/A N/A N/A N/A self _initializer N/A isinstance N/A self _initializer dict N/A N/A N/A N/A self update N/A deepcopy N/A self _initializer N/A N/A N/A N/A self _session_object set_session_id N/A self session_id N/A save N/A N/A self N/A N/A N/A N/A self _dirty N/A N/A N/A N/A self store N/A N/A self session_id N/A self _data N/A _valid_session_id N/A N/A self session_id N/A N/A N/A True N/A kill N/A N/A self N/A N/A N/A Kill the session, make it no longer available N/A N/A N/A self store N/A N/A self session_id N/A clear N/A N/A self N/A N/A N/A N/A N/A self store N/A N/A self session_id N/A N/A SessionObject N/A object N/A __init__ N/A N/A self app handler store session_config N/A N/A N/A N/A self app app N/A N/A self handler handler N/A N/A self store store N/A N/A self _config N/A deepcopy N/A app_config session_config N/A session_config N/A N/A N/A N/A N/A self _config update session_config N/A N/A self _session_name N/A N/A self _config name N/A get_session_id N/A N/A self N/A N/A N/A NotImplementedError N/A set_session_id N/A N/A self session_id N/A N/A N/A NotImplementedError N/A clear_session_id N/A N/A self N/A N/A N/A NotImplementedError N/A generate_session_id N/A N/A self N/A N/A N/A Generate a random id for session N/A secret_key N/A N/A self _config secret_key N/A True N/A N/A rand N/A N/A os urandom 16 N/A now N/A N/A time time N/A session_id N/A sha1 N/A %s%s%s%s N/A rand now N/A N/A N/A self handler request remote_ip secret_key N/A session_id N/A N/A session_id hexdigest N/A N/A session_id N/A self store N/A N/A N/A session_id N/A N/A CookieObject N/A SessionObject N/A set_session_id N/A N/A self session_id N/A N/A N/A N/A N/A self _set_cookie N/A self _session_name session_id N/A get_session_id N/A N/A self N/A N/A N/A N/A N/A self _get_cookie N/A self _session_name N/A clear_session_id N/A N/A self N/A N/A N/A N/A N/A N/A self handler clear_cookie N/A self _session_name N/A _set_cookie N/A N/A self name value N/A N/A N/A cookie_domain N/A N/A self _config cookie_domain N/A cookie_path N/A N/A self _config cookie_path N/A cookie_expires N/A N/A self _config cookie_expires N/A N/A N/A self _config secure N/A N/A N/A N/A N/A self handler set_secure_cookie name value expires_days N/A cookie_expires N/A 3600 24 domain cookie_domain path cookie_path N/A N/A N/A N/A N/A self handler set_cookie name value expires cookie_expires domain cookie_domain path cookie_path N/A _get_cookie N/A N/A self name N/A N/A N/A N/A N/A self _config secure N/A N/A N/A N/A N/A self handler get_secure_cookie name N/A N/A N/A N/A N/A self handler get_cookie name N/A N/A HeaderObject N/A SessionObject N/A get_session_id N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self handler request headers get N/A self _session_name N/A set_session_id N/A N/A self sid N/A N/A N/A N/A N/A N/A self handler set_header N/A self _session_name sid N/A clear_session_id N/A N/A self N/A N/A N/A N/A N/A N/A self handler clear_header N/A self _session_name N/A N/A Store N/A object N/A N/A Base class for session stores __contains__ N/A N/A self key N/A N/A N/A NotImplementedError N/A __getitem__ N/A N/A self key N/A N/A N/A NotImplementedError N/A __setitem__ N/A N/A self key value N/A N/A N/A NotImplementedError N/A cleanup N/A N/A self timeout N/A N/A N/A removes all the expired sessions N/A NotImplementedError N/A encode N/A N/A self session_data N/A N/A N/A encodes session dict as a string N/A pickled N/A N/A pickle dumps session_data N/A N/A N/A base64 encodestring pickled N/A decode N/A N/A self session_data N/A N/A N/A decodes the data to get back the session dict  N/A pickled N/A N/A base64 decodestring session_data N/A N/A N/A pickle loads pickled N/A N/A DiskStore N/A Store N/A N/A 
    Store for saving a session on disk.

        >>> import tempfile
        >>> root = tempfile.mkdtemp()
        >>> s = DiskStore(root)
        >>> s['a'] = 'foo'
        >>> s['a']
        'foo'
        >>> time.sleep(0.01)
        >>> s.cleanup(0.01)
        >>> s['a']
        Traceback (most recent call last):
            ...
        KeyError: 'a'
     __init__ N/A N/A self root N/A N/A N/A N/A N/A N/A N/A os path exists root N/A N/A N/A N/A os makedirs N/A N/A N/A os path abspath root N/A N/A self root root N/A _get_path N/A N/A self key N/A N/A N/A N/A N/A N/A os path sep key N/A N/A ValueError N/A Bad key: %s N/A repr key N/A N/A N/A N/A os path join N/A self root key N/A __contains__ N/A N/A self key N/A N/A N/A path N/A N/A self _get_path key N/A N/A N/A N/A os path exists path N/A __getitem__ N/A N/A self key N/A N/A N/A path N/A N/A self _get_path key N/A N/A N/A N/A os path exists path N/A N/A pickled N/A N/A N/A open path read N/A N/A N/A self decode pickled N/A N/A N/A ObjectDict N/A __setitem__ N/A N/A self key value N/A N/A N/A path N/A N/A self _get_path key N/A pickled N/A N/A self encode value N/A N/A N/A f N/A open path w N/A N/A N/A N/A N/A f write pickled N/A N/A N/A N/A f close N/A N/A N/A IOError N/A N/A N/A __delitem__ N/A N/A self key N/A N/A N/A path N/A N/A self _get_path key N/A N/A N/A N/A os path exists path N/A N/A N/A N/A os remove path N/A cleanup N/A N/A self timeout N/A N/A N/A now N/A N/A time time N/A f N/A N/A os listdir N/A self root N/A N/A path N/A N/A self _get_path f N/A atime N/A N/A N/A os stat path st_atime N/A N/A N/A now atime timeout N/A N/A N/A N/A os remove path N/A N/A RedisStore N/A Store N/A __init__ N/A N/A self N/A kwargs N/A N/A N/A self timeout N/A N/A N/A kwargs get timeout N/A N/A app_config session_config timeout N/A __contains__ N/A N/A self key N/A N/A N/A N/A N/A N/A N/A self get_connection key exists key N/A __setitem__ N/A N/A self key value N/A N/A N/A conn N/A N/A self get_connection key N/A N/A N/A conn hset key data N/A N/A self encode value N/A N/A N/A conn expire key N/A self timeout N/A __getitem__ N/A N/A self key N/A N/A N/A data N/A N/A N/A N/A self get_connection key hget key data N/A data N/A N/A N/A N/A self decode data N/A N/A N/A ObjectDict N/A __delitem__ N/A N/A self key N/A N/A N/A N/A N/A N/A N/A self get_connection key delete key N/A cleanup N/A N/A self timeout N/A N/A N/A N/A get_connection N/A N/A self key N/A N/A N/A redis N/A N/A N/A redis Redis N/A N/A