SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
Overall
score
85%
A module that configures and manages database connection pooling for optimal performance in production environments.
@generates
def create_production_engine(database_url: str):
"""
Creates a database engine with production-ready connection pool settings.
The engine should be configured with:
- Pool size of 10 connections
- Max overflow of 5 additional connections
- Pool timeout of 30 seconds
- Pre-ping enabled to verify connection health
Args:
database_url: Database connection string
Returns:
Database engine with production connection pool configuration
"""
pass
def create_test_engine(database_url: str):
"""
Creates a database engine with test-appropriate pool settings.
The engine should use a single static connection suitable for testing.
Args:
database_url: Database connection string
Returns:
Database engine with single connection for testing
"""
passProvides database engine creation and connection pooling functionality.
@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