How it Works¶
Adding Routes, Routers, and Events¶
The msdss_base_api.core.API
wraps around FastAPI to define routes and logic, while Uvicorn is used to serve the APIs programmatically.
First a FastAPI()
object is created, and routes/routers are added with .add_api_route() / .include_router(), while API events are handled with .add_event_handler().
Then uvicorn
is used to run the app with .run().
These form the basis of adding routes, routers, and events.
For more information on adding routes, routers, and events, see:
Combining Routes, Routers, and Events Across Apps¶
When adding routes, routers, and events, the arguments are tracked in attributes routes
, routers
, and events
, which are then
used to combine routes, routers, and events from other app instances.
For more information on combining app routes, routers, and events, see: