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

Method open_session

src/flask/sessions.py:249–261  ·  view source on GitHub ↗

This is called at the beginning of each request, after pushing the request context, before matching the URL. This must return an object which implements a dictionary-like interface as well as the :class:`SessionMixin` interface. This will return ``None`` to indicate

(self, app: Flask, request: Request)

Source from the content-addressed store, hash-verified

247 )
248
249 def open_session(self, app: Flask, request: Request) -> SessionMixin | None:
250 """This is called at the beginning of each request, after
251 pushing the request context, before matching the URL.
252
253 This must return an object which implements a dictionary-like
254 interface as well as the :class:`SessionMixin` interface.
255
256 This will return ``None`` to indicate that loading failed in
257 some way that is not immediately an error. The request
258 context will fall back to using :meth:`make_null_session`
259 in this case.
260 """
261 raise NotImplementedError()
262
263 def save_session(
264 self, app: Flask, session: SessionMixin, response: Response

Callers 2

session_transactionMethod · 0.45
pushMethod · 0.45

Calls

no outgoing calls

Tested by 1

session_transactionMethod · 0.36