
- Set up FastAPI project structure with API versioning - Create database models for users and tasks - Implement SQLAlchemy ORM with SQLite database - Initialize Alembic for database migrations - Create API endpoints for task management (CRUD) - Create API endpoints for user management - Add JWT authentication and authorization - Add health check endpoint - Add comprehensive README.md with API documentation
18 lines
281 B
Python
18 lines
281 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[str] = None
|