CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-pydantic

Data validation using Python type hints

90

1.30x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer uses Pydantic's ConfigDict to configure model-wide validation behavior, specifically focusing on strict validation, assignment validation, extra field handling, and string transformations.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "ConfigDict usage",
      "description": "The model uses ConfigDict (either as model_config class attribute or in the model definition) to configure model-wide behavior",
      "max_score": 15
    },
    {
      "name": "Strict validation",
      "description": "ConfigDict includes strict=True to enable strict type validation and prevent type coercion",
      "max_score": 20
    },
    {
      "name": "Assignment validation",
      "description": "ConfigDict includes validate_assignment=True to revalidate fields when attributes are reassigned after initialization",
      "max_score": 20
    },
    {
      "name": "Extra fields handling",
      "description": "ConfigDict includes extra='forbid' to reject any undefined fields not present in the model schema",
      "max_score": 20
    },
    {
      "name": "String whitespace stripping",
      "description": "ConfigDict includes str_strip_whitespace=True to automatically strip leading and trailing whitespace from string inputs",
      "max_score": 20
    },
    {
      "name": "Field constraints",
      "description": "Uses Field with gt=0 constraint for max_connections to enforce positive integer requirement",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-pydantic

tile.json