app.py 512 B

1234567891011121314151617
  1. from fastapi import FastAPI
  2. from app.api.routes import router
  3. from app.bootstrap.settings import EventServiceSettings
  4. from app.db.session import build_session_factory
  5. def create_app() -> FastAPI:
  6. settings = EventServiceSettings()
  7. app = FastAPI(
  8. title="agent-platform event-service",
  9. version="0.1.0",
  10. )
  11. app.state.settings = settings
  12. app.state.session_factory = build_session_factory(settings)
  13. app.include_router(router, prefix="/events", tags=["events"])
  14. return app