Circular buffer storing numpy arrays that can be shared between one writer and several readers
Project description
sferriol-scb
sferriol-scb is a module to create Numpy Shared Cyclic Buffer
Installation
pip install sferriol-scb
Usage
Writer
from sferriol import scb
with scb.Writer(
name = 'toto', # name of the shared cyclic buffer
capacity=100000, # number of arrays allocated
shape=(1, ), # shape of the arrays
dtype=np.uint32 # dtype of the arrays
) as writer:
writer.put(np.asarray(1234)) # put one array in the buffer
Async_Reader
from sferriol import scb
with scb.Async_Reader(name='toto', timeout=10) as reader:
data = await reader.get()
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file sferriol_scb-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: sferriol_scb-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da597626d5481f5e995662c099c9418668e8e471933ca44e51f9638c6afba881 |
|
MD5 | f9447a04c963d10c56bbd7f3c0d4f6c6 |
|
BLAKE2b-256 | 1facfa56e7d7fd034e3a0a478a58c104bfd68ec86997a6c586eb716543318f75 |