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 details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for sferriol_scb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81fe7762d446430d2cdbe90b236063b886af13fac131bc4013482c6116670c23
MD5 6caf1dfb6b8c13a95aec45280a685b3a
BLAKE2b-256 53916d1845336937a710b37bd3c5389b0000e7d8fa71893ab77845d32ccae730

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