Codexcoder commited on
Commit
e72a9d0
·
verified ·
1 Parent(s): 1eab213

pec5d: add pec5d/api/app.py

Browse files
Files changed (1) hide show
  1. pec5d/api/app.py +42 -0
pec5d/api/app.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # pec5d/api/app.py
2
+ """
3
+ PEC5D standalone FastAPI app.
4
+
5
+ Run standalone::
6
+
7
+ uvicorn pec5d.api.app:app --host 0.0.0.0 --port 8002
8
+
9
+ or mount into the Sovereign orchestrator (src/sovereign/main.py) which
10
+ includes pec5d.api.routes.router under /api/v1/pec5d.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from fastapi import FastAPI
16
+
17
+ from pec5d import __brand__, __version__
18
+ from pec5d.api.routes import router
19
+
20
+ app = FastAPI(
21
+ title="PEC5D API",
22
+ version=__version__,
23
+ description=f"{__brand__} — Full Evolution & Manifestation API",
24
+ )
25
+ app.include_router(router)
26
+
27
+
28
+ @app.get("/")
29
+ def index() -> dict:
30
+ """Service banner."""
31
+ return {
32
+ "service": "pec5d",
33
+ "brand": __brand__,
34
+ "version": __version__,
35
+ "endpoints": "/api/v1/pec5d/*",
36
+ }
37
+
38
+
39
+ @app.get("/health")
40
+ def health() -> dict:
41
+ """Liveness probe."""
42
+ return {"status": "ok", "brand": __brand__, "version": __version__}