https://github.com/rrthomas/chainstream
https://github.com/rrthomas/chainstream
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rrthomas/chainstream
- Owner: rrthomas
- Created: 2023-04-04T16:26:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T12:48:56.000Z (over 1 year ago)
- Last Synced: 2026-01-05T00:17:12.407Z (5 months ago)
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chainstream
Chainstream provides the class `ChainStream`, a subclass of `io.RawIOBase`,
to chain I/O streams together into a single stream. See below for example
usage, and the module help for more information.
Chainstream is distributed under the CC-BY-SA version 4.0; see
https://creativecommons.org/licenses/by-sa/4.0/
## Example
```
from chainstream import ChainStream
def generate_open_file_streams():
for file in filenames:
yield open(file, 'rb')
f = io.BufferedReader(ChainStream(generate_open_file_streams()))
f.read()
```