/opt/imh-python/lib/python3.9/site-packages/flask
NameSizeModeActions
json/-0755rm
__pycache__/-0755rm
app.py980590644editdlrm
blueprints.py214000644editdlrm
cli.py310350644editdlrm
config.py100520644editdlrm
ctx.py167240644editdlrm
debughelpers.py64750644editdlrm
globals.py16370644editdlrm
helpers.py430740644editdlrm
logging.py32500644editdlrm
sessions.py143600644editdlrm
signals.py22120644editdlrm
templating.py49390644editdlrm
testing.py101460644editdlrm
views.py58020644editdlrm
wrappers.py47360644editdlrm
_compat.py40990644editdlrm
__init__.py18940644editdlrm
__main__.py2540644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/flask/globals.py (1637B)
# -*- coding: utf-8 -*- """ flask.globals ~~~~~~~~~~~~~ Defines all the global objects that are proxies to the current active context. :copyright: 2010 Pallets :license: BSD-3-Clause """ from functools import partial from werkzeug.local import LocalProxy from werkzeug.local import LocalStack _request_ctx_err_msg = """\ Working outside of request context. This typically means that you attempted to use functionality that needed an active HTTP request. Consult the documentation on testing for information about how to avoid this problem.\ """ _app_ctx_err_msg = """\ Working outside of application context. This typically means that you attempted to use functionality that needed to interface with the current application object in some way. To solve this, set up an application context with app.app_context(). See the documentation for more information.\ """ def _lookup_req_object(name): top = _request_ctx_stack.top if top is None: raise RuntimeError(_request_ctx_err_msg) return getattr(top, name) def _lookup_app_object(name): top = _app_ctx_stack.top if top is None: raise RuntimeError(_app_ctx_err_msg) return getattr(top, name) def _find_app(): top = _app_ctx_stack.top if top is None: raise RuntimeError(_app_ctx_err_msg) return top.app # context locals _request_ctx_stack = LocalStack() _app_ctx_stack = LocalStack() current_app = LocalProxy(_find_app) request = LocalProxy(partial(_lookup_req_object, "request")) session = LocalProxy(partial(_lookup_req_object, "session")) g = LocalProxy(partial(_lookup_app_object, "g"))