Skip to main content

A pure Python ring buffer for bytes

Project description

pyRing Buffer

A pure Python ring/circular buffer for bytes.

pip install pyring-buffer
from pyring_buffer import RingBuffer

rb = RingBuffer(10)  # max 10 bytes

# Put only 5 bytes in
rb.put(bytes([1, 2, 3, 4, 5]))

# Everything is there
assert rb.getvalue() == bytes([1, 2, 3, 4, 5])

# Put a total of 12 bytes in
rb.put(bytes([6, 7, 8, 9, 10, 11, 12]))

# First 2 bytes are gone
assert rb.getvalue() == bytes([3, 4, 5, 6, 7, 8, 9, 10, 11, 12])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyring_buffer-1.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyring_buffer-1.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pyring_buffer-1.1.0.tar.gz.

File metadata

  • Download URL: pyring_buffer-1.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyring_buffer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 490af7fc8a12f5c282867609d88eb03446df9696168f2ae3664e221113973d61
MD5 eed9b93f9884393cc6bb060eff9c936f
BLAKE2b-256 790ebbc344944c9102bd9b8e730983b4c0639b882cb0a5b98837134a3e381bfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyring_buffer-1.1.0.tar.gz:

Publisher: publish.yml on rhasspy/pyring-buffer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyring_buffer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyring_buffer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyring_buffer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6eb24aa9966d3e3c6018bf14a3cb25047d982ce5a86dbfee9f8ac53995b7f00
MD5 a04bdfa63e944a400e4f85df50b534c0
BLAKE2b-256 9b6bf51108b3f64cce09c9e5754278492c267a293bcc9e1881b92078bad470aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyring_buffer-1.1.0-py3-none-any.whl:

Publisher: publish.yml on rhasspy/pyring-buffer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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