I have a FastAPI app with a few mounted sub applications, and would like to know if there is a app.subapps()
or similar method to give me the instances of sub applications mounted to the main app.
Thanks
I have a FastAPI app with a few mounted sub applications, and would like to know if there is a app.subapps()
or similar method to give me the instances of sub applications mounted to the main app.
Thanks
Copyright © 2021 Jogjafile Inc.
Every app that is mounted into another application is added to the application's routes as a mounted route.
We can therefor iterate over the registered routes and keep those that are instances of the
Mount
object.This outputs: