Skip to main content

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​

AttributeTypeDescription
app[App](../sansio/app/app.md?sid=flask_sansio_app_app)The Flask application instance associated with this environment, used to access configuration and blueprint-specific template loaders.

Constructor​

Signature​

def Environment(
app: [App](../sansio/app/app.md?sid=flask_sansio_app_app),
**options: t.Any
) - > None

Parameters​

NameTypeDescription
app[App](../sansio/app/app.md?sid=flask_sansio_app_app)The Flask application instance associated with this environment.
**optionst.AnyAdditional configuration options for the Jinja environment.

Signature​

def Environment(
app: [App](../sansio/app/app.md?sid=flask_sansio_app_app),
**options: t.Any
) - > null

Parameters​

NameTypeDescription
app[App](../sansio/app/app.md?sid=flask_sansio_app_app)The Flask application instance used to initialize the global Jinja loader and provide context for template resolution
**optionst.AnyArbitrary keyword arguments passed to the Jinja2 BaseEnvironment constructor, such as extensions or autoescaping settings