Registry / devops / jaraco-stream

jaraco-stream

JSON →
library3.0.4pypypiunverified

A library providing routines for dealing with data streams, including chunking, tokenizing, and other utility functions for processing iterable streams of data. Current version 3.0.4, supports Python >=3.8. Maintained as part of the jaraco project with periodic releases.

pip install jaraco-stream
INSTALL
IMPORT
SIG · JARACO-STREAM
J
jaraco-stream
devopspythonv3.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

chunked
from jaraco.stream import chunked
from jaraco.stream import chunked

Demonstrates chunking and joining with jaraco.stream.

from jaraco.stream import chunked, join # Chunk an iterable into batches of 3 for batch in chunked(range(10), 3): print(list(batch)) # Output: # [0, 1, 2] # [3, 4, 5] # [6, 7, 8] # [9] # Join iterables with separator result = join(['a', 'b', 'c'], sep=', ') print(list(result)) # Output: ['a', ', ', 'b', ', ', 'c']
Debug
Known issues
gotchaThe `chunked` function returns an iterator of iterators; materialize each chunk to a list if you need to reuse it.
fix
Use `list(batch)` inside the loop to consume each chunk.
affects: all
deprecatedThe `run_length_encode` and `run_length_decode` functions have been removed in version 3.0.0.
fix
Use custom implementation or upgrade to 3.0+ and avoid those functions.
affects: <3.0.0
breakingIn version 3.0.0, the package dropped support for Python 3.5 and 3.6. Ensure Python >=3.8.
fix
Upgrade Python to 3.8 or later.
affects: >=3.0.0
Upgrade
Version history
3.0.4latest on PyPI · released Aug 21, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jaraco-stream — pip install jaraco-stream · libregistry