Skip to main content

No project description provided

Project description

stream-valve

A throughput valve util.

Installation

pip install stream-valve

Quick Started

from stream_valve.valve import FileValve

filepath = <THE_FILEPATH>

file_size = os.path.getsize(dummy_file)
size_accumulator = 0

valve = FileValve(filepath=filepath)
with valve:
    for chunk in valve:
        size_accumulator += len(chunk)

assert size_accumulator == file_size

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

stream_valve-0.1.0.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

stream_valve-0.1.0-py3-none-any.whl (7.2 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