OpenBSD Handbook

Current snapshot · amd64 · Generated 2026-09-09

py3-iterable-io-1.0.4

adapt generators and other iterable to a file-like interface

Back to search · Project homepage

Description

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.

Package information

Ports path
devel/py-iterable-io
Package architecture
amd64
Maintainer
Klemens Nanni <kn@openbsd.org>
Categories
devel, lang/python
Available flavors
None listed
Only for architectures
aarch64, amd64, arm, i386, mips64, mips64el, powerpc, powerpc64, riscv64, sparc64, alpha, hppa

These are ports metadata. Binary availability depends on the release, architecture and mirror. Build and test dependencies are not an installation checklist.

Direct dependencies

Runtime

Build

Test

Used by (2 dependency relationships)

Includes library, runtime, build and test relationships. Results load 100 at a time.

Installing and updating packages · Package details as JSON