SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
Overall
score
85%
{
"context": "This criteria evaluates how well the engineer uses SQLModel's UUID primary key functionality to implement a user profile management system. The focus is on correctly defining UUID primary keys with automatic generation and using them for database operations.",
"type": "weighted_checklist",
"checklist": [
{
"name": "UUID field type",
"description": "The UserProfile model uses uuid.UUID as the type for the id field",
"max_score": 20
},
{
"name": "Primary key configuration",
"description": "The id field uses Field() with primary_key=True parameter to designate it as the primary key",
"max_score": 20
},
{
"name": "Automatic UUID generation",
"description": "The id field uses Field() with default_factory=uuid.uuid4 to automatically generate UUIDs for new records",
"max_score": 25
},
{
"name": "SQLModel table definition",
"description": "The UserProfile class inherits from SQLModel with table=True parameter to define it as a database table",
"max_score": 15
},
{
"name": "Session operations",
"description": "The create_user_profile function uses session.add(), session.commit(), and session.refresh() to properly persist and retrieve the generated UUID",
"max_score": 10
},
{
"name": "UUID-based retrieval",
"description": "The get_user_profile function uses session.get() or session.exec(select()) with the UUID identifier to retrieve profiles",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-sqlmodeldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10