Home / Function/ get() — flask Function Reference

get() — flask Function Reference

Architecture documentation for the get() function in ctx.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  c1644887_6834_cf5b_9551_6a1aa07a77d7["get()"]
  27fd902b_d034_0c03_9e1b_dd8edc261a75["_AppCtxGlobals"]
  c1644887_6834_cf5b_9551_6a1aa07a77d7 -->|defined in| 27fd902b_d034_0c03_9e1b_dd8edc261a75
  1d3f07dc_9109_7e7a_b38b_b74fa5c8b2de["__repr__()"]
  1d3f07dc_9109_7e7a_b38b_b74fa5c8b2de -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  8167ef87_1dbb_573b_1e60_34c9eaef098a["after_this_request()"]
  8167ef87_1dbb_573b_1e60_34c9eaef098a -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  f7f0b202_038e_4088_d0b8_b9f6511ffba0["copy_current_request_context()"]
  f7f0b202_038e_4088_d0b8_b9f6511ffba0 -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  cbc89160_10a3_1f28_8af7_a0cead4c2fe8["has_request_context()"]
  cbc89160_10a3_1f28_8af7_a0cead4c2fe8 -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  cf135ef0_3c35_dafc_14ea_3e666ed9f351["has_app_context()"]
  cf135ef0_3c35_dafc_14ea_3e666ed9f351 -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  c03b3eb7_5e70_0ee6_2d39_454cca5a0f61["pop()"]
  c03b3eb7_5e70_0ee6_2d39_454cca5a0f61 -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  bd6f23cb_dba0_e4d4_5806_2956f407d349["run()"]
  bd6f23cb_dba0_e4d4_5806_2956f407d349 -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  2fb51a6c_c865_a662_cc63_fc9d9a6036ce["test_client()"]
  2fb51a6c_c865_a662_cc63_fc9d9a6036ce -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  d79553e1_9435_9b37_b132_99c938d6f250["url_for()"]
  d79553e1_9435_9b37_b132_99c938d6f250 -->|calls| c1644887_6834_cf5b_9551_6a1aa07a77d7
  dd770ec8_c848_909d_cc1c_2082f8bc5b07["get()"]
  c1644887_6834_cf5b_9551_6a1aa07a77d7 -->|calls| dd770ec8_c848_909d_cc1c_2082f8bc5b07
  style c1644887_6834_cf5b_9551_6a1aa07a77d7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/flask/ctx.py lines 67–76

    def get(self, name: str, default: t.Any | None = None) -> t.Any:
        """Get an attribute by name, or a default value. Like
        :meth:`dict.get`.

        :param name: Name of attribute to get.
        :param default: Value to return if the attribute is not present.

        .. versionadded:: 0.10
        """
        return self.__dict__.get(name, default)

Subdomains

Defined In

Calls

Frequently Asked Questions

What does get() do?
get() is a function in the flask codebase, defined in src/flask/ctx.py.
Where is get() defined?
get() is defined in src/flask/ctx.py at line 67.
What does get() call?
get() calls 1 function(s): get.
What calls get()?
get() is called by 9 function(s): __repr__, after_this_request, copy_current_request_context, has_app_context, has_request_context, pop, run, test_client, and 1 more.

Analyze Your Own Codebase

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

Try Supermodel Free