Environment
Works like a regular Jinja environment but has some additional knowledge of how Flask's blueprint works so that it can prepend the name of the blueprint to referenced templates if necessary.
Attributes
| Attribute | Type | Description |
|---|---|---|
| app | [App](../sansio/app/app.md?sid=src_flask_sansio_app_app) | The Flask application instance associated with this environment, used to manage blueprint-aware template loading and configuration. |
Constructor
Signature
def Environment(
app: [App](../sansio/app/app.md?sid=src_flask_sansio_app_app),
**options: t.Any
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| app | [App](../sansio/app/app.md?sid=src_flask_sansio_app_app) | The Flask application instance associated with this environment. |
| **options | t.Any | Arbitrary keyword arguments passed to the base Jinja environment constructor. |
Signature
def Environment(
app: [App](../sansio/app/app.md?sid=src_flask_sansio_app_app),
**options: t.Any
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| app | [App](../sansio/app/app.md?sid=src_flask_sansio_app_app) | The Flask application instance used to initialize the global Jinja loader and provide context for template resolution |
| **options | t.Any | Arbitrary keyword arguments passed to the base Jinja Environment constructor, such as 'loader', 'extensions', or 'autoescape' |