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.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file sferriol_scb-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sferriol_scb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da597626d5481f5e995662c099c9418668e8e471933ca44e51f9638c6afba881
MD5 f9447a04c963d10c56bbd7f3c0d4f6c6
BLAKE2b-256 1facfa56e7d7fd034e3a0a478a58c104bfd68ec86997a6c586eb716543318f75

See more details on using hashes here.

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