set_trap
Contextmanager that installs the trap app.
The trap means that anything trying to use the current or default app
will raise an exception.
def set_trap(
app: Flask
) - > contextmanager
Contextmanager that installs the trap app. The trap means that anything trying to use the current or default app will raise an exception.
Parameters
| Name | Type | Description |
|---|---|---|
| app | Flask | The application instance to be isolated or replaced by the trap mechanism during the context. |
Returns
| Type | Description |
|---|---|
contextmanager | A context manager that yields control while the trap is active and restores the previous application state upon exit. |