TagMarkup Class — flask Architecture
Architecture documentation for the TagMarkup class in tag.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 1a9dfbb9_dce3_55ba_f6a2_521defe95f7f["TagMarkup"] a0222544_1c8a_9b62_d419_e9d66bd3544a["JSONTag"] 1a9dfbb9_dce3_55ba_f6a2_521defe95f7f -->|extends| a0222544_1c8a_9b62_d419_e9d66bd3544a 5e2eed77_f23f_513d_2d00_d39ce63b14ab["tag.py"] 1a9dfbb9_dce3_55ba_f6a2_521defe95f7f -->|defined in| 5e2eed77_f23f_513d_2d00_d39ce63b14ab 5f13bb3a_ea55_cdff_4521_d99ca4a408cf["check()"] 1a9dfbb9_dce3_55ba_f6a2_521defe95f7f -->|method| 5f13bb3a_ea55_cdff_4521_d99ca4a408cf b5f54c7c_36b7_d2ab_f3df_9fb70aea58ab["to_json()"] 1a9dfbb9_dce3_55ba_f6a2_521defe95f7f -->|method| b5f54c7c_36b7_d2ab_f3df_9fb70aea58ab c396a7e2_1f31_c033_d06b_8fec0996d90b["to_python()"] 1a9dfbb9_dce3_55ba_f6a2_521defe95f7f -->|method| c396a7e2_1f31_c033_d06b_8fec0996d90b
Relationship Graph
Source Code
src/flask/json/tag.py lines 173–188
class TagMarkup(JSONTag):
"""Serialize anything matching the :class:`~markupsafe.Markup` API by
having a ``__html__`` method to the result of that method. Always
deserializes to an instance of :class:`~markupsafe.Markup`."""
__slots__ = ()
key = " m"
def check(self, value: t.Any) -> bool:
return callable(getattr(value, "__html__", None))
def to_json(self, value: t.Any) -> t.Any:
return str(value.__html__())
def to_python(self, value: t.Any) -> t.Any:
return Markup(value)
Domain
Defined In
Extends
Source
Frequently Asked Questions
What is the TagMarkup class?
TagMarkup is a class in the flask codebase, defined in src/flask/json/tag.py.
Where is TagMarkup defined?
TagMarkup is defined in src/flask/json/tag.py at line 173.
What does TagMarkup extend?
TagMarkup extends JSONTag.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free