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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file stream_valve-0.1.0.tar.gz
.
File metadata
- Download URL: stream_valve-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.8.17 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 687eeca1b2d633d0f40093e87d5f2b05f36d08f25b8ec56d3b4cf093709b2a24 |
|
MD5 | 33bc0f71db646e8422d6c84214fdb0e4 |
|
BLAKE2b-256 | be74d55909f653ac7a3861b05fd98c889da9c03a63bb749e310f92f5c04f3a6f |
File details
Details for the file stream_valve-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: stream_valve-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.8.17 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dd1ed7645e9aacdc8cef07f7939bac695f9136cee7c1e1bc2c27ec441a6ccf0 |
|
MD5 | 333d6b9375e02e32b7bf72c4003c03ed |
|
BLAKE2b-256 | e2ef4aeb8ce7a9220202c649ef2f34f115ad34a267fcbd6e0d25e11636adc4af |