Skip to main content

Chain I/O streams together

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chainstream-1.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

chainstream-1.0.1-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page