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 consume the stream. Operations are not thread-safe. Reader is responsible of releasing buffers. Writer hands off responsibility over buffers.
Stream has
with,bytes,bool,copyanddeepcopysupport.Extends:
BufferedIOBase-
__len__() -> intNumber of buffers held in stream
-
nbytes -> intNumber of bytes held in stream
-
buffers -> Iterable[memoryview]Peeking iterator over buffers
-
__getitem__(index) -> memoryviewPeek a buffer from the stream
-
unreadbuffer(b: memoryview) -> intUnread a buffer into the stream
-
readbuffer() -> memoryviewRead a buffer from stream
-
readbuffers() -> Iterable[memoryview]Read all buffers from stream
-
unwritebuffer() -> memoryviewUnwrite a buffer from the stream
-
writebuffer(b: memoryview) -> intWrite a buffer into the stream
-
writebuffers(bs: Iterable[memoryview]) -> intWrite many buffers into the stream
-
frombuffer(b: Buffer) -> StreamConstruct a stream from a buffer
-
tobuffer() -> memoryviewTransform stream to contiguous buffer (may copy)
-
copy() -> StreamShallow copy of stream
-
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-2.0.0.tar.gz.
File metadata
- Download URL: streamview-2.0.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1c98b76910728214a93c847bd989481e0e5cdc2dc07c44f56ae1adf73c4d117
|
|
| MD5 |
917828de0f9fbbeb9478eb80f7cb2e01
|
|
| BLAKE2b-256 |
3d061acb73faf9b068ab9c53ca434310ea4ae356c1af5af14af46d7be42036cb
|
File details
Details for the file streamview-2.0.0-py3-none-any.whl.
File metadata
- Download URL: streamview-2.0.0-py3-none-any.whl
- Upload date:
- Size: 17.9 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 |
e570fc230ea78589d730cceeb96ab8c008bd1b510c21a7c086a0b2cb44490e9f
|
|
| MD5 |
434c7f83bf14f7dd68191755518015d3
|
|
| BLAKE2b-256 |
99c79dd1728028593e1b176f9c311d035aba7e70c0a82e9f8e0f27fd5ed34f0d
|