Home / Class/ ModelWithCustomEncoder Class — fastapi Architecture

ModelWithCustomEncoder Class — fastapi Architecture

Architecture documentation for the ModelWithCustomEncoder class in test_jsonable_encoder.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  eb4cf655_092d_203b_58cb_614226bb52a0["ModelWithCustomEncoder"]
  80ce950d_4c72_e7d9_21bb_a5c60524786c["test_jsonable_encoder.py"]
  eb4cf655_092d_203b_58cb_614226bb52a0 -->|defined in| 80ce950d_4c72_e7d9_21bb_a5c60524786c
  e9196f64_5130_591a_2468_ec6a5432629b["serialize_dt_field()"]
  eb4cf655_092d_203b_58cb_614226bb52a0 -->|method| e9196f64_5130_591a_2468_ec6a5432629b

Relationship Graph

Source Code

tests/test_jsonable_encoder.py lines 143–148

    class ModelWithCustomEncoder(BaseModel):
        dt_field: datetime

        @field_serializer("dt_field")
        def serialize_dt_field(self, dt):
            return dt.replace(microsecond=0, tzinfo=timezone.utc).isoformat()

Domain

Frequently Asked Questions

What is the ModelWithCustomEncoder class?
ModelWithCustomEncoder is a class in the fastapi codebase, defined in tests/test_jsonable_encoder.py.
Where is ModelWithCustomEncoder defined?
ModelWithCustomEncoder is defined in tests/test_jsonable_encoder.py at line 143.

Analyze Your Own Codebase

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

Try Supermodel Free