tessl install tessl/pypi-pydantic@2.11.0Data validation using Python type hints
Agent Success
Agent success rate when using this tile
90%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.3x
Baseline
Agent success rate without this tile
69%
{
"context": "This criteria evaluates how well the engineer uses Pydantic's enum value serialization capability to create a validated user model with proper enum handling. The focus is on using BaseModel, ConfigDict with use_enum_values, and model serialization methods.",
"type": "weighted_checklist",
"checklist": [
{
"name": "BaseModel inheritance",
"description": "User class inherits from pydantic.BaseModel to enable validation and serialization",
"max_score": 20
},
{
"name": "use_enum_values configuration",
"description": "ConfigDict with use_enum_values=True is used to serialize enums as their values instead of enum instances",
"max_score": 30
},
{
"name": "Enum field typing",
"description": "status field is properly typed as AccountStatus enum in the User model",
"max_score": 15
},
{
"name": "model_dump method",
"description": "to_dict() method uses model_dump() to serialize the User instance to a dictionary",
"max_score": 20
},
{
"name": "model_validate usage",
"description": "Uses model_validate() or direct initialization to create User instances from dictionaries, leveraging Pydantic's validation",
"max_score": 15
}
]
}