SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
Overall
score
85%
Build a REST API service for managing products in an e-commerce system. The service should provide endpoints for creating, reading, updating, and listing products with proper validation.
Products have the following attributes:
Implement the following REST endpoints:
POST /products/ - Create a new product
GET /products/{product_id} - Get a single product by ID
GET /products/ - List all products
PATCH /products/{product_id} - Update an existing product
@generates
Use an in-memory SQLite database for storage.
# FastAPI application with product management endpointsProvides database ORM with data validation support.
Web framework for building APIs.
ASGI server for running FastAPI applications.
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