RAVA Python Driver
The RAVA Python Driver provides a Python interface for communicating with RAVA8 True Random Number Generator (TRNG) devices running the RAVA8 Firmware.
Features
- USB communication with RAVA8 devices
- Random bit, byte, integer and floating-point generation
- TCP relay server supporting simultaneous access by multiple TCP clients
Requirements
- Python 3.11 or later
- pyserial
Installation
The driver is available on PyPI as rng_rava. After creating and activating a Python virtual environment, install it with:
pip install rng_rava
Usage
import rng_rava as rava
# Find the serial number of the attached RAVA devices
rava_sns = rava.find_rava_sns()
# Create a RNG_USB instance and connect to the first device
rng = rava.RAVA_USB()
rng.open(rava_sns[0])
# Measure 100 pulse counts
pc_a, pc_b = rng.gen_pulse_counts(n_counts=100)
# Generate a random bit XORing both cores
bit = rng.gen_bit(rng_cores=rava.R_RngCores.AB_XOR)
# Generate 100 random bytes in each core
bytes_a, bytes_b = rng.gen_bytes(n_bytes=100)
# Generate 100 8-bit integers between 0 and 99
ints8 = rng.gen_int8s(n_ints=100, delta=100)
# Generate 100 16-bit integers between 0 and 999
ints16 = rng.gen_int16s(n_ints=100, delta=1000)
# Generate 100 32-bit floats ranging between 0 and 1
floats = rng.gen_floats(n_floats=100)
# Close RAVA device
rng.close()
Additional examples are available in the examples/ directory.
Firmware Compatibility
| Firmware Version | Driver Version |
|---|---|
| v1.0.0 | v1.1.0 – v1.2.1 |
| ≥ v2.0.0 | ≥ v2.0.0 |
| ≥ v3.0.0 | ≥ v3.0.0 |
Contact
Metadata
Release files for rng-rava 3.0.0
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 |
|---|---|---|---|---|
| rng_rava-3.0.0.tar.gz | 33.8 kB | With provenance | Details for rng_rava-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rng_rava-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for rng_rava-3.0.0-py3-none-any.whl |
Total release size: 71.8 kB
Release files / rng_rava-3.0.0.tar.gz
| Download URL | rng_rava-3.0.0.tar.gz |
|---|---|
| Size | 33.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85a9c02f0b05a7c219d5421ae2045bd1742daeb47152f19f4a0d9bf3e3ab8b29
|
|
BLAKE2b-256 checksum How to use checksums |
4462a84fda8467a519f3601ba49fdd4657dd0696322d19437297235f39a93baa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logRelease files / rng_rava-3.0.0-py3-none-any.whl
| Download URL | rng_rava-3.0.0-py3-none-any.whl |
|---|---|
| Size | 38.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc4ddb5b050b7c049ec0a7300f3c6b718641d82be59ae770c19acdfc5bff9b15
|
|
BLAKE2b-256 checksum How to use checksums |
e237bd10ccf981839b2d7d5cec47cb83185a1270c1bcdef7a202154475bbbcf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logSecurity for rng-rava 3.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rng_rava-3.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logA 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.