CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-sqlmodel

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

Overall
score

85%

Overview
Eval results
Files

task.mdevals/scenario-3/

User Profile Manager

A simple user profile management system that uses universally unique identifiers for record tracking.

Capabilities

Create user profiles

  • Creating a new user profile with name "Alice" and email "alice@example.com" returns a profile with a unique identifier @test
  • Creating multiple user profiles generates different unique identifiers for each profile @test

Retrieve user profiles

  • Retrieving a user profile by its identifier returns the correct user data @test
  • Attempting to retrieve a non-existent profile identifier returns None @test

Implementation

@generates

API

class UserProfile:
    """
    Represents a user profile with a unique identifier.

    Attributes:
        id: A universally unique identifier that serves as the primary key
        name: The user's full name
        email: The user's email address
    """
    pass

def create_user_profile(session, name: str, email: str) -> UserProfile:
    """
    Creates a new user profile in the database.

    Args:
        session: Database session for operations
        name: The user's full name
        email: The user's email address

    Returns:
        The created UserProfile with an automatically generated unique identifier
    """
    pass

def get_user_profile(session, profile_id) -> UserProfile | None:
    """
    Retrieves a user profile by its unique identifier.

    Args:
        session: Database session for operations
        profile_id: The unique identifier of the profile to retrieve

    Returns:
        The UserProfile if found, None otherwise
    """
    pass

Dependencies { .dependencies }

sqlmodel { .dependency }

Provides database modeling and session management support.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-sqlmodel

tile.json