
- Set up FastAPI application with CORS and authentication - Implement user registration and login with JWT tokens - Create SQLAlchemy models for users and items - Add CRUD endpoints for item management - Configure Alembic for database migrations - Add health check endpoint - Include comprehensive API documentation - Set up proper project structure with routers and schemas
12 lines
287 B
Python
12 lines
287 B
Python
import os
|
|
from pydantic import BaseSettings
|
|
|
|
class Settings(BaseSettings):
|
|
secret_key: str = os.getenv("SECRET_KEY", "your-secret-key-here")
|
|
algorithm: str = "HS256"
|
|
access_token_expire_minutes: int = 30
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
settings = Settings() |