Skip to main content

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


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

sferriol_scb-0.2.0-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page