Automated Action 95a8111a53 Implement simple todo app with FastAPI
- Created project structure and FastAPI application
- Added SQLite database models and Pydantic schemas
- Implemented todo routes (add, list, delete)
- Set up Alembic migrations
- Added health endpoint

generated with BackendIM... (backend.im)
2025-05-13 13:09:47 +00:00

22 lines
628 B
Python

import uvicorn
from fastapi import FastAPI
from app.api.todos import router as todos_router
from app.api.health import router as health_router
from app.database.database import Base, engine
# Create the database tables
Base.metadata.create_all(bind=engine)
# Create FastAPI app
app = FastAPI(
title="Simple Todo API",
description="A simple API for managing todos",
version="0.1.0"
)
# Include routers
app.include_router(todos_router, prefix="/todos", tags=["todos"])
app.include_router(health_router, tags=["health"])
if __name__ == "__main__":
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)