tessl install tessl/pypi-sqlmodel@0.0.0SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
Agent Success
Agent success rate when using this tile
85%
Improvement
Agent success rate improvement when using this tile compared to baseline
1x
Baseline
Agent success rate without this tile
85%
Build a simple task management database system that stores projects and their associated tasks.
Create a database system that:
Defines two data models:
Project model with fields: id (integer, auto-generated), name (string), and description (optional string)Task model with fields: id (integer, auto-generated), title (string), completed (boolean, defaults to False), and project_id (integer, references Project)Initializes a SQLite database connection using an in-memory database (:memory:)
Creates all necessary database tables based on the model definitions
Provides a function setup_database() that returns a database session ready for use
@generates
def setup_database():
"""
Initialize the database connection, create all tables, and return a session.
Returns:
A database session object ready for operations
"""
passProvides database modeling and SQL operations support.