MCPcopy
hub / github.com/pallets/flask / is_null_session

Method is_null_session

src/flask/sessions.py:162–169  ·  view source on GitHub ↗

Checks if a given object is a null session. Null sessions are not asked to be saved. This checks if the object is an instance of :attr:`null_session_class` by default.

(self, obj: object)

Source from the content-addressed store, hash-verified

160 return self.null_session_class()
161
162 def is_null_session(self, obj: object) -> bool:
163 """Checks if a given object is a null session. Null sessions are
164 not asked to be saved.
165
166 This checks if the object is an instance of :attr:`null_session_class`
167 by default.
168 """
169 return isinstance(obj, self.null_session_class)
170
171 def get_cookie_name(self, app: Flask) -> str:
172 """The name of the session cookie. Uses``app.config["SESSION_COOKIE_NAME"]``."""

Callers 2

session_transactionMethod · 0.80
process_responseMethod · 0.80

Calls

no outgoing calls

Tested by 1

session_transactionMethod · 0.64