This release is a pre-release and may not be stable for production use.
Random Byte Array
A lightweight Python utility for generating random byte arrays.
Features
- Simple, dependency-free implementation
- Useful for testing, simulations, and data generation
- Supports Python 2+
Installation
pip install random-byte-array
Usage
from random_byte_array import random_byte_array
# Generate a random bytearray
data = random_byte_array()
# Example output: bytearray(b'\x12\xa3\x7f\x00\xe4...')
How It Works
The algorithm:
- Generates values in range
[0, 256] - Appends values
0-255as bytes - Stops when encountering 256 (≈0.39% chance per iteration)
Average output size: ~255 bytes (geometric distribution)
Use Cases
- Test data for binary protocols
- Fuzz testing
- Cryptographic simulations
- Generating random binary payloads
Contributing
Contributions are welcome! Please submit pull requests or open issues on GitHub.
License
MIT
Metadata
Release files for random-byte-array 0.1.0a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| random_byte_array-0.1.0a0.tar.gz | 2.6 kB | Without provenance | Details for random_byte_array-0.1.0a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| random_byte_array-0.1.0a0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for random_byte_array-0.1.0a0-py2.py3-none-any.whl |
Total release size: 5.6 kB
Release files / random_byte_array-0.1.0a0.tar.gz
| Download URL | random_byte_array-0.1.0a0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d773cc1eaf07b6366d9815d75ed93310470ca3f20f72b5120b9d0ab791bd694
|
|
BLAKE2b-256 checksum How to use checksums |
b9697b0c7bb5db9138b4927ad5198f025386b4676b60ffe526e02d9ba0526ff0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Release files / random_byte_array-0.1.0a0-py2.py3-none-any.whl
| Download URL | random_byte_array-0.1.0a0-py2.py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b0207c2f27b314cce40268ecf379a82742b9c67755a1807b8713297df90c30c8
|
|
BLAKE2b-256 checksum How to use checksums |
e8fe5068117938a53e4ba0dcb1c8403b339d1f5744126d843be35a4e79722d64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Security for random-byte-array 0.1.0a0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.