• Bug#1068488: RFP: iterable-io -- Adapt generators and other iterables t

    From Antoine Beaupre@21:1/5 to All on Sat Apr 6 09:51:14 2024
    XPost: linux.debian.bugs.dist

    Package: wnpp
    Severity: wishlist
    X-Debbugs-Cc: debian-python@lists.debian.org

    * Package name : iterable-io
    Version : 1.0.0
    Upstream Contact: Carey Metcalfe <carey@cmetcalfe.ca>
    * URL : https://pypi.org/project/iterable-io/
    * License : LGPLv3
    Programming Lang: Python
    Description : Adapt generators and other iterables to a file-like interface

    iterable-io is a small Python library that provides an adapter so that
    it's possible to read from iterable objects in the same way as
    file-like objects.

    It is primarily useful as "glue" between two incompatible
    interfaces. As an example, in the case where one interface expects a
    file-like object to call .read() on, and the other only provides a
    generator of bytes.

    One way to solve this issue would be to write all the bytes in the
    generator to a temporary file, then provide that file instead, but if
    the generator produces a large amount of data then this is both slow
    to start, and resource-intensive.

    This library allows streaming data between these two incompatible
    interfaces so as data is requested by .read(), it's pulled from the
    iterable. This keeps resource usage low and removes the startup delay.

    ----

    this is a new dependency introduced by magic-wormhole 0.14

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)