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.0.2.tar.gz (6.9 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.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyring_buffer-1.0.2.tar.gz
  • Upload date:
  • Size: 6.9 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.0.2.tar.gz
Algorithm Hash digest
SHA256 c449d975fb4d72009b7dfe7a08372020ef30e49d69ef26934ebdbfd11868b8d9
MD5 c220468bb6601c55f4ac64f1aa65b42e
BLAKE2b-256 02dd4ef4d4c58974d65661379220a6877a22aa11fc849aeeafe4e38a6de41d9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyring_buffer-1.0.2.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.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyring_buffer-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ab9ee16223d1b916cd64bcef507f09ddc10a9538368cd8a1a97fc6c279ee666
MD5 d32995adcae8c171aab87fba45bc93ac
BLAKE2b-256 8106b3a6e8f12df7ebe7f46283b33473e8ed9d6167ab6489d82bf8fbfbd2167e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyring_buffer-1.0.2-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