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)
| 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 |
no outgoing calls