Home / Function/ app() — flask Function Reference

app() — flask Function Reference

Architecture documentation for the app() function in globals.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  d374b506_8b36_b4e6_3147_5db4fa8f8d91["app()"]
  9cff5a62_7dbb_7b80_cf3c_128a7a2fda28["globals.py"]
  d374b506_8b36_b4e6_3147_5db4fa8f8d91 -->|defined in| 9cff5a62_7dbb_7b80_cf3c_128a7a2fda28
  6cabef6b_f1ce_76af_5916_c4e9a439548c["load_app()"]
  6cabef6b_f1ce_76af_5916_c4e9a439548c -->|calls| d374b506_8b36_b4e6_3147_5db4fa8f8d91
  112697fd_abe3_7738_1bc4_8f3d27bbbb68["run_command()"]
  112697fd_abe3_7738_1bc4_8f3d27bbbb68 -->|calls| d374b506_8b36_b4e6_3147_5db4fa8f8d91
  b7db9b24_d5be_a8c2_55fe_26b8b73ffe93["_get_current_object()"]
  d374b506_8b36_b4e6_3147_5db4fa8f8d91 -->|calls| b7db9b24_d5be_a8c2_55fe_26b8b73ffe93
  style d374b506_8b36_b4e6_3147_5db4fa8f8d91 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/flask/globals.py lines 9–30

    from .app import Flask
    from .ctx import _AppCtxGlobals
    from .ctx import AppContext
    from .sessions import SessionMixin
    from .wrappers import Request

    T = t.TypeVar("T", covariant=True)

    class ProxyMixin(t.Protocol[T]):
        def _get_current_object(self) -> T: ...

    # These subclasses inform type checkers that the proxy objects look like the
    # proxied type along with the _get_current_object method.
    class FlaskProxy(ProxyMixin[Flask], Flask): ...

    class AppContextProxy(ProxyMixin[AppContext], AppContext): ...

    class _AppCtxGlobalsProxy(ProxyMixin[_AppCtxGlobals], _AppCtxGlobals): ...

    class RequestProxy(ProxyMixin[Request], Request): ...

    class SessionMixinProxy(ProxyMixin[SessionMixin], SessionMixin): ...

Subdomains

Frequently Asked Questions

What does app() do?
app() is a function in the flask codebase, defined in src/flask/globals.py.
Where is app() defined?
app() is defined in src/flask/globals.py at line 9.
What does app() call?
app() calls 1 function(s): _get_current_object.
What calls app()?
app() is called by 2 function(s): load_app, run_command.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free