SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
Overall
score
85%
A simple user profile management system that uses universally unique identifiers for record tracking.
@generates
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
"""
passProvides database modeling and session management support.
@satisfied-by
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