|
|
from fastapi import FastAPI |
|
|
from .routes import route_a |
|
|
from .routes import route_b |
|
|
from .routes import route_c |
|
|
from .routes import route_d |
|
|
from .routes import route_e |
|
|
from fastapi.middleware.cors import CORSMiddleware |
|
|
|
|
|
app = FastAPI(title="Battery Simulation API", version="1.0") |
|
|
|
|
|
app.add_middleware( |
|
|
CORSMiddleware, |
|
|
allow_origins=["*"], |
|
|
allow_credentials=True, |
|
|
allow_methods=["*"], |
|
|
allow_headers=["*"], |
|
|
) |
|
|
|
|
|
|
|
|
app.include_router(route_a.router, tags=["Core Steady-State Cell Specs (A)"]) |
|
|
app.include_router(route_b.router, prefix="/b", tags=["B: Dynamic performance curves"]) |
|
|
app.include_router(route_c.router, prefix="/c", tags=["C: Electrochemical signatures"]) |
|
|
app.include_router(route_d.router, prefix="/d", tags=["D: Balancing & first-cycle losses"]) |
|
|
app.include_router(route_e.router, prefix="/e", tags=["E: Ageing & durability forecasts"]) |
|
|
|