Pre-release
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
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 | |
|---|---|---|---|
| random_byte_array-0.1.0a0.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| random_byte_array-0.1.0a0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
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
|