Automated Action 512d53de73 Create simple Todo application with FastAPI and SQLite
- Created CRUD operations for todos
- Added database models and SQLAlchemy integration
- Set up Alembic for database migrations
- Added health endpoint
- Updated README with installation and usage instructions

generated with BackendIM... (backend.im)
2025-05-12 10:34:56 +00:00

20 lines
533 B
Python

from fastapi import FastAPI
from app.routers import todos, health
from app.database import create_tables
app = FastAPI(
title="Todo Application API",
description="A simple API for managing todo items",
version="1.0.0"
)
# Initialize database tables
create_tables()
# Include routers
app.include_router(todos.router, prefix="/api/todos", tags=["todos"])
app.include_router(health.router, tags=["health"])
if __name__ == "__main__":
import uvicorn
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)