CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-sqlmodel

SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.

85

1.00x
Quality

Pending

Does it follow best practices?

Impact

85%

1.00x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-3/

{
  "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
    }
  ]
}

tile.json