devel/py-iterable-io 1.0.0 NetBSD
Adapt generators and other iterables to a python file-like interface
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- License
- gnu-lgpl-v3
- Categories
- devel, python
- Package size
- 8.1 KiB, 27.1 KiB installed
Description
`iterable-io` is a small Python library that provides an adapter so that it's possible to read from [iterable](https://docs.python.org/3/glossary.html#term-iterable) objects in the same way as [file-like](https://docs.python.org/3/glossary.html#term-file-object) 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
In the other systems
| System | Port | Version |
|---|---|---|
| NetBSD | devel/py-iterable-io | 1.0.0 |
| FreeBSD | devel/py-iterable-io | 1.0.0_1 |
| OpenBSD | devel/py-iterable-io | 1.0.4 |
| DragonFly | devel/py-iterable-io | 1.0.0_1 |
| HardenedBSD | devel/py-iterable-io | 1.0.0_1 |
| GhostBSD | devel/py-iterable-io | 1.0.0_1 |
Install
Binary package:
pkgin install py311-iterable-io
From pkgsrc:
cd /usr/pkgsrc/devel/py-iterable-io && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 1.0.0 |
| NetBSD 10.1 aarch64 | 1.0.0 |
| SmartOS / illumos x86_64 | 1.0.0 |
| macOS 15 arm64 | 1.0.0 |
Dependencies
Run dependencies 1
Required by 1
Configuration
No options to configure.
- Service scripts
- none
- Flavors
py312-iterable-io-1.0.0,py313-iterable-io-1.0.0,py314-iterable-io-1.0.0