22 lines
355 B
Python
22 lines
355 B
Python
from fastapi import FastAPI
|
|
|
|
APP_NAME = "Python FastAPI Template"
|
|
APP_VERSION = "1.0.0"
|
|
|
|
app = FastAPI(
|
|
title=APP_NAME,
|
|
version=APP_VERSION
|
|
)
|
|
|
|
@app.get("/health")
|
|
def health():
|
|
return {"status": "ok"}
|
|
|
|
@app.get("/version")
|
|
def version():
|
|
return {
|
|
"app": APP_NAME,
|
|
"version": APP_VERSION,
|
|
"language": "python"
|
|
}
|