iterable-io
Adapt generators and other iterables to a file-like interface
Decision gist · record as of 2026-08-14
Yes. The package solves a real interface-adaptation problem with zero dependencies, low install friction, active maintenance, and no known vulnerabilities. The copyleft license (LGPL-3.0-only) is straightforward for most use cases but requires review if you plan to modify or redistribute the code. Install it when you need to feed an iterable into code expecting a file-like object.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- No runtime dependencies and a pure-Python wheel distribution make installation straightforward.
- The package is actively maintained with a recent release.
License · maintenance · safety
LGPL-3.0-only (copyleft) — Licensed under LGPL-3.0-only (copyleft). Any derivative work or modification must be distributed under the same license; static linking or bundling requires careful attention to license compliance.
last release 2026-05-17 (89 days) · last repo commit 2026-05-17 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 665,646 downloads/mo, #5,427 on PyPI
Alternatives
Verify before relying
pip install iterable-io
from iterable_io import open_iterable
gen = (b'chunk' for _ in range(3))
fp = open_iterable(gen, 'rb')
data = fp.read(4096)
fp.close()- Whether the library handles all edge cases for text-mode encoding/decoding (e.g., multi-byte character boundaries across chunk boundaries).
- Performance characteristics when iterables produce very small chunks or very large chunks.
- Whether buffering options (if any) are configurable beyond what the docstring documents.
What it is and what it does
iterable-io bridges a common interface mismatch: when one part of your code has a generator or other iterable producing data, but another part expects a file-like object with a `.read()` method. Rather than materializing the entire iterable into a temporary file (which is slow and memory-intensive), this library streams data on demand, pulling from the iterable as `.read()` is called.
The package exports a single function, `open_iterable()`, designed to mimic Python's builtin `open()`. It accepts an iterable, a mode string ('rb', 'rt', etc.), and optional parameters like encoding and buffering, returning a file-like object. This is useful for gluing together incompatible APIs—for example, when a library expects a file handle but your data comes from a generator of bytes or lines.
Use it for
- Adapt a generator of bytes to feed into a library that requires a file-like object (e.g., image processing, archive extraction).
- Stream text data line-by-line from a generator without materializing the full dataset into memory.
- Convert network streams or database result iterators into file-like interfaces for downstream processing.
- Avoid temporary file creation when bridging APIs that produce and consume data differently.
- Read compressed or encoded data from a generator while handling text-mode decoding transparently.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a real interface-adaptation problem with zero dependencies, low install friction, active maintenance, and no known vulnerabilities. The copyleft license (LGPL-3.0-only) is straightforward for most use cases but requires review if you plan to modify or redistribute the code. Install it when you need to feed an iterable into code expecting a file-like object.
Install
iterable-io on PyPI
Before you install
No runtime dependencies and a pure-Python wheel distribution make installation straightforward. The package is actively maintained with a recent release.
License in practice
Licensed under LGPL-3.0-only (copyleft). Any derivative work or modification must be distributed under the same license; static linking or bundling requires careful attention to license compliance.
Quickstart
pip install iterable-io
from iterable_io import open_iterable
gen = (b'chunk' for _ in range(3))
fp = open_iterable(gen, 'rb')
data = fp.read(4096)
fp.close()
Verify before relying
- Whether the library handles all edge cases for text-mode encoding/decoding (e.g., multi-byte character boundaries across chunk boundaries).
- Performance characteristics when iterables produce very small chunks or very large chunks.
- Whether buffering options (if any) are configurable beyond what the docstring documents.
Package facts
| License | LGPL-3.0-only copyleft |
| Python support | Supports the current Python release >=3.5 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 89 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 665,646 / month, #5,427 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: iterable_io-1.0.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “generator to file-like object”
- iterable-ioWraps iterables (generators, lists, etc.) as file-like objects so…
- zope.filerepresentationDefines interfaces for representing objects as files and directories,…
- s3pathlibs3pathlib provides a pathlib-like object-oriented interface to AWS…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also zipstream-ng · zipstream · flupy · zipstream-new · streaming-form-data · jsonslicer · ijson · seekablehttpfile · iterproxy · file-read-backwards