Automated Action 0e00013b7f Implement product catalog API with CRUD operations
- Created FastAPI application with product catalog functionality
- Implemented CRUD operations for products
- Added SQLAlchemy models and Pydantic schemas
- Set up SQLite database with Alembic migrations
- Added health check endpoint
- Updated README with project documentation

generated with BackendIM... (backend.im)
2025-05-13 17:21:00 +00:00

19 lines
470 B
Python

from fastapi import FastAPI
from app.api.api import api_router
from app.db.database import create_db_and_tables
app = FastAPI(
title="Product Catalog API",
description="A simple product catalog API with CRUD operations",
version="0.1.0",
)
@app.on_event("startup")
def on_startup():
create_db_and_tables()
app.include_router(api_router)
if __name__ == "__main__":
import uvicorn
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)