SessionMixin Class — flask Architecture
Architecture documentation for the SessionMixin class in sessions.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 22ae6a8e_9381_0dda_c9eb_5c5c7c0d67b1["SessionMixin"] f793a407_79ea_667a_f29e_29bbf57c781f["sessions.py"] 22ae6a8e_9381_0dda_c9eb_5c5c7c0d67b1 -->|defined in| f793a407_79ea_667a_f29e_29bbf57c781f 75c7a5e7_bb89_c955_27a2_f52f797d9627["permanent()"] 22ae6a8e_9381_0dda_c9eb_5c5c7c0d67b1 -->|method| 75c7a5e7_bb89_c955_27a2_f52f797d9627
Relationship Graph
Source Code
src/flask/sessions.py lines 24–49
class SessionMixin(MutableMapping[str, t.Any]):
"""Expands a basic dictionary with session attributes."""
@property
def permanent(self) -> bool:
"""This reflects the ``'_permanent'`` key in the dict."""
return self.get("_permanent", False) # type: ignore[no-any-return]
@permanent.setter
def permanent(self, value: bool) -> None:
self["_permanent"] = bool(value)
#: Some implementations can detect whether a session is newly
#: created, but that is not guaranteed. Use with caution. The mixin
# default is hard-coded ``False``.
new = False
#: Some implementations can detect changes to the session and set
#: this when that happens. The mixin default is hard coded to
#: ``True``.
modified = True
#: Some implementations can detect when session data is read or
#: written and set this when that happens. The mixin default is hard
#: coded to ``True``.
accessed = True
Domain
Defined In
Source
Frequently Asked Questions
What is the SessionMixin class?
SessionMixin is a class in the flask codebase, defined in src/flask/sessions.py.
Where is SessionMixin defined?
SessionMixin is defined in src/flask/sessions.py at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free