Home / Function/ tag() — flask Function Reference

tag() — flask Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  cc664eee_e322_7454_0ffe_63c77d52dae1["tag()"]
  a0222544_1c8a_9b62_d419_e9d66bd3544a["JSONTag"]
  cc664eee_e322_7454_0ffe_63c77d52dae1 -->|defined in| a0222544_1c8a_9b62_d419_e9d66bd3544a
  1c0b69f5_4295_77b6_d206_95b0d9e9c0a0["tag()"]
  1c0b69f5_4295_77b6_d206_95b0d9e9c0a0 -->|calls| cc664eee_e322_7454_0ffe_63c77d52dae1
  69465ad8_d82d_7ee1_5bff_a7971021cf79["to_json()"]
  69465ad8_d82d_7ee1_5bff_a7971021cf79 -->|calls| cc664eee_e322_7454_0ffe_63c77d52dae1
  08d97a25_bf2d_8b1a_4141_99db7d245fd4["dumps()"]
  08d97a25_bf2d_8b1a_4141_99db7d245fd4 -->|calls| cc664eee_e322_7454_0ffe_63c77d52dae1
  1345c634_4b56_f84b_d547_757aafd127a4["to_json()"]
  cc664eee_e322_7454_0ffe_63c77d52dae1 -->|calls| 1345c634_4b56_f84b_d547_757aafd127a4
  1c0b69f5_4295_77b6_d206_95b0d9e9c0a0["tag()"]
  cc664eee_e322_7454_0ffe_63c77d52dae1 -->|calls| 1c0b69f5_4295_77b6_d206_95b0d9e9c0a0
  style cc664eee_e322_7454_0ffe_63c77d52dae1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/flask/json/tag.py lines 87–90

    def tag(self, value: t.Any) -> dict[str, t.Any]:
        """Convert the value to a valid JSON type and add the tag structure
        around it."""
        return {self.key: self.to_json(value)}

Domain

Subdomains

Frequently Asked Questions

What does tag() do?
tag() is a function in the flask codebase, defined in src/flask/json/tag.py.
Where is tag() defined?
tag() is defined in src/flask/json/tag.py at line 87.
What does tag() call?
tag() calls 2 function(s): tag, to_json.
What calls tag()?
tag() is called by 3 function(s): dumps, tag, to_json.

Analyze Your Own Codebase

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

Try Supermodel Free