Initial commit

This commit is contained in:
2025-04-02 22:29:37 +02:00
commit c03c0ae3e5
39 changed files with 5445 additions and 0 deletions

25
api/rpk-api/main.py Normal file
View File

@@ -0,0 +1,25 @@
from contextlib import asynccontextmanager
from fastapi import FastAPI
from hub.auth import oauth_router
if __name__ == '__main__':
import uvicorn
uvicorn.run("main:app", host='0.0.0.0', port=8000, reload=True)
@asynccontextmanager
async def lifespan(app: FastAPI):
# create_db_and_tables()
# create_admin_user()
yield
# do something before end
app = FastAPI(root_path="/api/v1", lifespan=lifespan)
app.include_router(
oauth_router,
prefix="/auth/google",
tags=["auth"],
)