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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
490af7fc8a12f5c282867609d88eb03446df9696168f2ae3664e221113973d61
|
|
| MD5 |
eed9b93f9884393cc6bb060eff9c936f
|
|
| BLAKE2b-256 |
790ebbc344944c9102bd9b8e730983b4c0639b882cb0a5b98837134a3e381bfb
|
Provenance
The following attestation bundles were made for pyring_buffer-1.1.0.tar.gz:
Publisher:
publish.yml on rhasspy/pyring-buffer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyring_buffer-1.1.0.tar.gz -
Subject digest:
490af7fc8a12f5c282867609d88eb03446df9696168f2ae3664e221113973d61 - Sigstore transparency entry: 938382031
- Sigstore integration time:
-
Permalink:
rhasspy/pyring-buffer@ead66c163d9d8b3baba604537b93eb3eb35476f3 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/rhasspy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ead66c163d9d8b3baba604537b93eb3eb35476f3 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6eb24aa9966d3e3c6018bf14a3cb25047d982ce5a86dbfee9f8ac53995b7f00
|
|
| MD5 |
a04bdfa63e944a400e4f85df50b534c0
|
|
| BLAKE2b-256 |
9b6bf51108b3f64cce09c9e5754278492c267a293bcc9e1881b92078bad470aa
|
Provenance
The following attestation bundles were made for pyring_buffer-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on rhasspy/pyring-buffer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyring_buffer-1.1.0-py3-none-any.whl -
Subject digest:
a6eb24aa9966d3e3c6018bf14a3cb25047d982ce5a86dbfee9f8ac53995b7f00 - Sigstore transparency entry: 938382037
- Sigstore integration time:
-
Permalink:
rhasspy/pyring-buffer@ead66c163d9d8b3baba604537b93eb3eb35476f3 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/rhasspy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ead66c163d9d8b3baba604537b93eb3eb35476f3 -
Trigger Event:
push
-
Statement type: