
- Set up project structure - Configure SQLite database with SQLAlchemy - Create item model and schema - Set up Alembic for database migrations - Implement CRUD operations for items - Add health check endpoint - Add API documentation - Configure Ruff for linting - Update README with project information
14 lines
308 B
Python
14 lines
308 B
Python
from typing import Any
|
|
|
|
from sqlalchemy.ext.declarative import as_declarative, declared_attr
|
|
|
|
|
|
@as_declarative()
|
|
class Base:
|
|
id: Any
|
|
__name__: str
|
|
|
|
# Generate tablename automatically based on class name
|
|
@declared_attr
|
|
def __tablename__(cls) -> str:
|
|
return cls.__name__.lower() |