32 lines
504 B
Python
32 lines
504 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
VERSION = "0.1.0"
|
|
|
|
@app.get("/")
|
|
def root():
|
|
return {
|
|
"service": "senaya-api",
|
|
"status": "running"
|
|
}
|
|
|
|
@app.get("/health")
|
|
def health():
|
|
return {
|
|
"status": "ok"
|
|
}
|
|
|
|
@app.get("/version")
|
|
def version():
|
|
return {
|
|
"version": VERSION
|
|
}
|
|
|
|
@app.get("/info")
|
|
def info():
|
|
return {
|
|
"name": "senaya-api",
|
|
"purpose": "base service slot for senaya infrastructure",
|
|
"version": VERSION
|
|
}
|