ModelWithDatetimeField Class — fastapi Architecture
Architecture documentation for the ModelWithDatetimeField class in test_datetime_custom_encoder.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 36822c4d_a5a9_70a5_3b62_be238b251f9d["ModelWithDatetimeField"] ba3bdf28_df52_2d09_627b_a8d890f2909e["test_datetime_custom_encoder.py"] 36822c4d_a5a9_70a5_3b62_be238b251f9d -->|defined in| ba3bdf28_df52_2d09_627b_a8d890f2909e 9e7a1140_4d31_531d_9149_bdff2264fcff["serialize_datetime()"] 36822c4d_a5a9_70a5_3b62_be238b251f9d -->|method| 9e7a1140_4d31_531d_9149_bdff2264fcff
Relationship Graph
Source Code
tests/test_datetime_custom_encoder.py lines 11–16
class ModelWithDatetimeField(BaseModel):
dt_field: datetime
@field_serializer("dt_field")
def serialize_datetime(self, dt_field: datetime):
return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat()
Domain
Defined In
Source
Frequently Asked Questions
What is the ModelWithDatetimeField class?
ModelWithDatetimeField is a class in the fastapi codebase, defined in tests/test_datetime_custom_encoder.py.
Where is ModelWithDatetimeField defined?
ModelWithDatetimeField is defined in tests/test_datetime_custom_encoder.py at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free