
- Set up project structure with FastAPI - Configure SQLAlchemy with SQLite - Implement user and item models - Set up Alembic for database migrations - Create CRUD operations for models - Implement API endpoints for users and items - Add authentication functionality - Add health check endpoint - Configure Ruff for linting - Update README with comprehensive documentation
14 lines
263 B
Python
14 lines
263 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Token(BaseModel):
|
|
"""Schema for token response."""
|
|
access_token: str
|
|
token_type: str
|
|
|
|
|
|
class TokenPayload(BaseModel):
|
|
"""Schema for token payload."""
|
|
sub: Optional[int] = None |