Automated Action 938b6d4153 Create a simple generic REST API with FastAPI and SQLite
Implemented a complete FastAPI backend with:
- Project structure with FastAPI and SQLAlchemy
- SQLite database with proper configuration
- Alembic for database migrations
- Generic Item resource with CRUD operations
- REST API endpoints with proper validation
- Health check endpoint
- Documentation and setup instructions
2025-05-17 20:57:23 +00:00

17 lines
451 B
Python

import uvicorn
from fastapi import FastAPI
from app.api.api import api_router
from app.core.config import settings
app = FastAPI(
title=settings.PROJECT_NAME,
openapi_url=f"{settings.API_V1_STR}/openapi.json",
description="A simple generic REST API service",
version="0.1.0",
)
app.include_router(api_router, prefix=settings.API_V1_STR)
if __name__ == "__main__":
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)