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=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

NameTypeDescription
app[App](../sansio/app/app.md?sid=src_flask_sansio_app_app)The Flask application instance associated with this environment.
**optionst.AnyArbitrary 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

NameTypeDescription
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
**optionst.AnyArbitrary keyword arguments passed to the base Jinja Environment constructor, such as 'loader', 'extensions', or 'autoescape'