Automated Action 10ef945a25 Build simple Todo application with FastAPI and SQLite
- Created REST API for managing todo items
- Implemented SQLite database with SQLAlchemy ORM
- Added Alembic for database migrations
- Added health check endpoint

generated with BackendIM... (backend.im)
2025-05-13 06:22:39 +00:00

20 lines
486 B
Python

from fastapi import FastAPI
from app.api.routes import todos, health
from app.db.init_db import create_tables
app = FastAPI(
title="Todo API",
description="A simple Todo API built with FastAPI and SQLite",
version="0.1.0"
)
@app.on_event("startup")
async def startup():
create_tables()
app.include_router(todos.router)
app.include_router(health.router)
if __name__ == "__main__":
import uvicorn
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)