> built 2026-09-22 14:35 UTC from b2ed87d (master) · flaskstream2py 0.1.7. Details: build_info.json

# index.html.md

<!-- generated by epythet -->

# flaskstream2py

stream2py interface for incoming HTTP requests with Flask.

To install:	`pip install flaskstream2py`

## Purpose

This WIP library is intended to provide tools for a server or controller receiving data streams from an edge device over HTTP. This will enable consumers written for a stream2py interface to read streaming data from networked devices.

<p class="epythet-aggregates">This documentation as a single file: <a href="flaskstream2py.md">flaskstream2py.md</a> (Markdown, for agents).</p>


# _autosummary/flaskstream2py.flask_request_reader.html.md

# flaskstream2py.flask_request_reader

FlaskRequest Source

### Classes

| [`FlaskRequestReader`](_autosummary/flaskstream2py.flask_request_reader.html.md#flaskstream2py.flask_request_reader.FlaskRequestReader)([chk_size])   | A source reader that reads from an incoming HTTP request using Flask.   |
|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------|

### *class* flaskstream2py.flask_request_reader.FlaskRequestReader(chk_size=2048)

Bases: `SourceReader`

A source reader that reads from an incoming HTTP request using Flask.
Must be instantiated from a Flask request handler function to ensure
that the flask.request context is available.

```pycon
>>> from flask import Flask
>>> from flaskstream2py.flask_request_reader import FlaskRequestReader
>>> app = Flask(__name__)
```

```pycon
>>> def toy_callback(b: bytes, n_bytes_to_show=10):
...     print(f"Read {len(b)} bytes. First five {b[:n_bytes_to_show]}")
```

```pycon
>>> @app.route('/', methods=['POST'])
... def handle_stream():
...     reader = FlaskRequestReader()
...     with reader.open():
...         while True:
...             chk = reader.read()
...             toy_callback(chk)
```

#### close()

Close and clean up source reader.
Will be called when StreamBuffer stops or if an exception is raised during read and append
loop.

#### *property* info *: [dict](https://docs.python.org/3/builtins/stdtypes.html#dict)*

Returns the \_\_init_\_ arguments for the instance.

* **Returns:**
  dict

#### key(data)

Converts data into a comparable value to sort by

* **Parameters:**
  **data** – the return value of the ‘read’ method
* **Returns:**
  ComparableType

#### open()

Set up source to be read and set some source info affected by open time like the time of
open. Will be called in StreamBuffer immediately before first read.

#### read()

Reads raw bytes if the request body is not finished yet.
Raises a StopIteration exception if the request has finished.


# _autosummary/flaskstream2py.html.md

# flaskstream2py

Exports FlaskRequestReader

### Modules

| [`flask_request_reader`](_autosummary/flaskstream2py.flask_request_reader.html.md#module-flaskstream2py.flask_request_reader)   | FlaskRequest Source   |
|--------------------------------------------------------------------------------------------------------------------|-----------------------|


# about-this-build.html.md

<!-- generated by epythet -->

# About this build

This documentation was built on **2026-09-22 14:35 UTC** from commit <a href="https://github.com/i2mint/flaskstream2py/commit/b2ed87d40f0b3dad2c871de4d065a5305e7a8a19"><code>b2ed87d</code></a> on branch <code>master</code>, for **flaskstream2py 0.1.7** (from <code>pyproject.toml</code>).

#### NOTE
Nothing suggests a mismatch: the tree was clean at the commit above, and the documented version is the one on PyPI.

## Source

|                     |                                                                                                                                                              |
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Commit              | <a href="https://github.com/i2mint/flaskstream2py/commit/b2ed87d40f0b3dad2c871de4d065a5305e7a8a19"><code>b2ed87d40f0b3dad2c871de4d065a5305e7a8a19</code></a> |
| Branch              | <code>master</code>                                                                                                                                          |
| Tags at this commit | none                                                                                                                                                         |
| Working tree        | clean                                                                                                                                                        |
| Remote              | <code>https://github.com/i2mint/flaskstream2py</code>                                                                                                        |

## Continuous integration

|              |                                                                                             |
|--------------|---------------------------------------------------------------------------------------------|
| Repository   | <code>i2mint/flaskstream2py</code>                                                          |
| Run          | <a href="https://github.com/i2mint/flaskstream2py/actions/runs/35741119254">35741119254</a> |
| Ref          | <code>refs/heads/master</code>                                                              |
| Event commit | <code>b2ed87d40f0b3dad2c871de4d065a5305e7a8a19</code> (in the history of the built commit)  |

## Tools

|          |         |
|----------|---------|
| epythet  | 0.2.12  |
| Sphinx   | 9.1.0   |
| docutils | 0.22.4  |
| Python   | 3.12.14 |

## Configuration as resolved

|               |                                                                  |
|---------------|------------------------------------------------------------------|
| theme         | <code>auto</code> (Sphinx theme <code>shibuya</code>)            |
| accent        | <code>#3b6600</code>                                             |
| api_generator | <code>autosummary</code>                                         |
| ignore        | <code>tests/</code>, <code>scrap/</code>, <code>examples/</code> |
| agent_outputs | <code>true</code>                                                |
| aggregates    | <code>md</code>                                                  |
| ai_artifacts  | <code>true</code>                                                |

## Package on PyPI

Latest release: <a href="https://pypi.org/project/flaskstream2py/0.1.7/">0.1.7</a>, the same as the documented version.

## Reproduce

```bash
git clone https://github.com/i2mint/flaskstream2py && cd flaskstream2py
git checkout b2ed87d40f0b3dad2c871de4d065a5305e7a8a19
pip install "epythet==0.2.12"
epythet quickstart . --ignore tests/ scrap/ examples/
```

The same data, for machines: <a href="build_info.json"><code>build_info.json</code></a> (schema version 1).


# api.html.md

# API reference

| [`flaskstream2py`](_autosummary/flaskstream2py.html.md#module-flaskstream2py)   | Exports FlaskRequestReader   |
|-----------------------------------------------------------------------------------------|------------------------------|


