Home / Function/ _stream() — flask Function Reference

_stream() — flask Function Reference

Architecture documentation for the _stream() function in templating.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  7e368e93_5307_3273_cf9b_b38ace3d5f4d["_stream()"]
  554becd3_25b5_c670_a654_7a20377dec19["templating.py"]
  7e368e93_5307_3273_cf9b_b38ace3d5f4d -->|defined in| 554becd3_25b5_c670_a654_7a20377dec19
  15d02cdb_c023_0b6d_4bca_4b5aaa9f0a48["stream_template()"]
  15d02cdb_c023_0b6d_4bca_4b5aaa9f0a48 -->|calls| 7e368e93_5307_3273_cf9b_b38ace3d5f4d
  20291251_04b0_a786_a59e_b11df7768862["stream_template_string()"]
  20291251_04b0_a786_a59e_b11df7768862 -->|calls| 7e368e93_5307_3273_cf9b_b38ace3d5f4d
  8bb2476b_5a2a_1ec8_b02f_463fa3043e16["stream_with_context()"]
  7e368e93_5307_3273_cf9b_b38ace3d5f4d -->|calls| 8bb2476b_5a2a_1ec8_b02f_463fa3043e16
  style 7e368e93_5307_3273_cf9b_b38ace3d5f4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/flask/templating.py lines 162–177

def _stream(
    ctx: AppContext, template: Template, context: dict[str, t.Any]
) -> t.Iterator[str]:
    app = ctx.app
    app.update_template_context(ctx, context)
    before_render_template.send(
        app, _async_wrapper=app.ensure_sync, template=template, context=context
    )

    def generate() -> t.Iterator[str]:
        yield from template.generate(context)
        template_rendered.send(
            app, _async_wrapper=app.ensure_sync, template=template, context=context
        )

    return stream_with_context(generate())

Subdomains

Frequently Asked Questions

What does _stream() do?
_stream() is a function in the flask codebase, defined in src/flask/templating.py.
Where is _stream() defined?
_stream() is defined in src/flask/templating.py at line 162.
What does _stream() call?
_stream() calls 1 function(s): stream_with_context.
What calls _stream()?
_stream() is called by 2 function(s): stream_template, stream_template_string.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free