Files
papi-py/papi.py
stephen schuresko db783891c8
All checks were successful
Build and Push to Private Registry101 / build (push) Successful in 10s
feat: add user and post management with CRUD operations; include tests for functionality
2025-02-17 20:51:46 -05:00

28 lines
672 B
Python

#!/bin/env python3
from fastapi import FastAPI, Depends
import uvicorn
from sqlalchemy import create_engine, Column, Integer,String, ForeignKey
from sqlalchemy.engine import URL
from sqlalchemy.orm import sessionmaker, Session, declarative_base
import db
import users
import posts
db.Base.metadata.create_all(bind=db.engine)
app = FastAPI()
app.include_router(users.router)
app.include_router(posts.router)
@app.get("/")
async def root():
return {"message": "Hello World"}
if __name__ == "__main__":
uvicorn.run("papi:app", host="0.0.0.0", port=8912, reload=True, log_level="debug",
workers=5, limit_concurrency=10, limit_max_requests=100)