locate_app
No overview available.
def locate_app(
module_name: str,
app_name: str | None,
raise_if_not_found: t.Literal[False] = False
) - > Flask | None
Locates a Flask application instance within a specified module. This function is used to programmatically find and load a Flask app object.
Parameters
| Name | Type | Description |
|---|---|---|
| module_name | str | The name of the Python module to search for the Flask application. |
| app_name | `str | None` |
| raise_if_not_found | t.Literal[False] = False | A boolean indicating whether to raise an exception if the application is not found. When False, the function returns None if the app is not found. |
Returns
| Type | Description |
|---|---|
| `Flask | None` |