Zero-copy non-blocking pipe-like structure
Project description
streamview
Zero-copy non-blocking pipe-like structure
Install
Production
pip install streamview
Development
git clone https://github.com/hpca-uji/streamview.git
cd streamview
pip install -e .
Documentation
Classes
-
Stream()Zero-copy non-blocking pipe-like
Interface mimics a non-blocking BufferedIOBase, but operations return memoryviews instead of bytes.
Operations are not thread-safe. Reader is responsible of releasing chunks. Writer hands off responsibility over chunks.
Stream has
with,bytes,bool,copyanddeepcopysupport.Extends:
BufferedIOBase-
nbytes -> intNumber of bytes held in stream
-
nchunks -> intNumber of chunks held in stream
-
readchunk() -> memoryviewRead a chunk from stream
-
unreadchunk(chunk: memoryview) -> intUnread a chunk into the stream
-
readchunk() -> memoryviewRead a chunk from stream
-
unwritechunk() -> memoryviewUnwrite a chunk from the stream
-
writechunk(chunk: memoryview) -> intWrite a chunk into the stream
-
peekchunk() -> memoryviewPeek a chunk from stream
-
readchunks() -> Iterable[memoryview]Read all chunks from stream
-
writechunks(chunks: Iterable[memoryview]) -> intWrite many chunks into the stream
-
update(bs: Iterable[Buffer]) -> intWrite many buffers into the stream
-
clear() -> NoneRelease all chunks
-
copy() -> StreamShallow copy of stream
-
tobytes() -> bytesTransform stream to bytes (will copy)
-
frombytes(b: Buffer) -> StreamConstruct a stream from bytes
-
Functions
-
byteview(b: Buffer) -> memoryviewReturn a byte view of a buffer
Acknowledgments
The library has been partially supported by:
- Project PID2023-146569NB-C22 "Inteligencia sostenible en el Borde-UJI" funded by the Spanish Ministry of Science, Innovation and Universities.
- Project C121/23 Convenio "CIBERseguridad post-Cuántica para el Aprendizaje FEderado en procesadores de bajo consumo y aceleradores (CIBER-CAFE)" funded by the Spanish National Cybersecurity Institute (INCIBE).
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamview-1.0.0.tar.gz.
File metadata
- Download URL: streamview-1.0.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38a68c1482c970b7f94c95bec2c2ee2dabed49e6d98b2d24f4aa3142e6aa2dfa
|
|
| MD5 |
a1c98f14d9bad4dbc4071a9da39c77a6
|
|
| BLAKE2b-256 |
f5672e7360cb8876b6c8747b1d95bd42a3e2ca437f8f0232f3f2fc79c7e6deba
|
File details
Details for the file streamview-1.0.0-py3-none-any.whl.
File metadata
- Download URL: streamview-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc9a175a1f30304678f40b148d0a5e5b53676a8103d128f8718c71055ade16ab
|
|
| MD5 |
5c128e5f4f693ed438508a19ec0f4cc1
|
|
| BLAKE2b-256 |
d347070b1da0b897f865bca8457f1666706408b034be3d877418a0cd24655b78
|