Skip to main content

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

Metadata

Release files for stream-valve 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stream-valve 0.1.0
File Size Uploaded
stream_valve-0.1.0.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stream-valve 0.1.0
File Interpreter ABI Platform
stream_valve-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / stream_valve-0.1.0.tar.gz

Download URL stream_valve-0.1.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
687eeca1b2d633d0f40093e87d5f2b05f36d08f25b8ec56d3b4cf093709b2a24
BLAKE2b-256 checksum
How to use checksums
be74d55909f653ac7a3861b05fd98c889da9c03a63bb749e310f92f5c04f3a6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Darwin/22.5.0

Release files / stream_valve-0.1.0-py3-none-any.whl

Download URL stream_valve-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dd1ed7645e9aacdc8cef07f7939bac695f9136cee7c1e1bc2c27ec441a6ccf0
BLAKE2b-256 checksum
How to use checksums
e2ef4aeb8ce7a9220202c649ef2f34f115ad34a267fcbd6e0d25e11636adc4af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Darwin/22.5.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page