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 built-in type support including primitives (str, int, float, bool), collections (list, set, dict), and standard library types (UUID, datetime, date, Decimal, EmailStr) to validate and coerce data automatically.",
"type": "weighted_checklist",
"checklist": [
{
"name": "BaseModel Usage",
"description": "Uses BaseModel as the base class for EventRegistration to enable automatic validation and type coercion",
"max_score": 15
},
{
"name": "UUID Type",
"description": "Uses UUID type for event_id field, enabling automatic validation and conversion from string UUIDs",
"max_score": 10
},
{
"name": "EmailStr Type",
"description": "Uses EmailStr or similar email validation type for the email field to validate email addresses",
"max_score": 10
},
{
"name": "date Type",
"description": "Uses date type for registration_date field, enabling automatic conversion from string dates",
"max_score": 10
},
{
"name": "datetime Type",
"description": "Uses datetime type for event_datetime field, enabling automatic conversion from ISO format strings",
"max_score": 10
},
{
"name": "PositiveInt Constraint",
"description": "Uses PositiveInt or Field with gt=0 constraint for ticket_count to ensure positive integers",
"max_score": 10
},
{
"name": "Decimal Type",
"description": "Uses Decimal type for total_cost to handle monetary values with precision",
"max_score": 10
},
{
"name": "Set Collection",
"description": "Uses set type for tags field to handle unique collections automatically",
"max_score": 5
},
{
"name": "Dict Collection",
"description": "Uses dict type with appropriate typing (e.g., dict[str, bool]) for preferences field",
"max_score": 5
},
{
"name": "Optional Type",
"description": "Uses Optional type or default value for notes field to make it optional",
"max_score": 5
},
{
"name": "Serialization Methods",
"description": "Uses model_dump() or model_dump_json() methods to serialize validated data to dictionary or JSON format",
"max_score": 10
}
]
}