feat: complete Python FastAPI starter

This commit is contained in:
2026-10-14 17:39:59 +05:30
parent 1f04be7d62
commit 090cb51f16
2 changed files with 24 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import os
import uvicorn
from datetime import datetime
from fastapi import FastAPI
app = FastAPI(title="Cosmos Orbit FastAPI Starter")
@app.get("/")
def read_root():
return {
"status": "online",
"app": "Cosmos Orbit — Python FastAPI Server",
"timestamp": datetime.utcnow().isoformat()
}
@app.get("/health")
def health():
return {"status": "healthy"}
if __name__ == "__main__":
port = int(os.environ.get("PORT", 8000))
uvicorn.run("main:app", host="0.0.0.0", port=port)
+2
View File
@@ -0,0 +1,2 @@
fastapi>=0.110.0
uvicorn>=0.28.0