getquantumrand — Python SDK
Quantum-seeded randomness from QuantumRand: a NIST DRBG seeded from real IBM quantum hardware, with every value labelled by the source that produced it.
Install
pip install getquantumrand
Quick Start
from getquantumrand import QuantumRandClient
qr = QuantumRandClient("qr_your_api_key")
# Generate 256 quantum random bits
bits = qr.bits(256)
# Random hex string
hex_str = qr.hex(128)
# Random integer in range
number = qr.integer(1, 100)
# Cryptographic key (AES-256)
key = qr.key(256)
# Batch: multiple values in one call
results = qr.batch([
{"type": "bits", "params": {"n": 64}},
{"type": "integer", "params": {"min": 1, "max": 6}},
{"type": "integer", "params": {"min": 1, "max": 6}},
])
# Async webhook delivery
qr.webhook("https://your-app.com/webhook", type="key", params={"bits": 256})
# Usage stats
print(qr.stats())
Configuration
qr = QuantumRandClient(
api_key="qr_your_key",
base_url="https://quantumrand.dev", # default
backend=None, # default: the server's quantum-seeded source
timeout=30.0,
)
Leave backend unset to get the quantum-seeded default. Set it only to request a
specific engine, e.g. "aer_simulator" (a simulator).
Where your randomness came from
Every response is labelled with its source. The client keeps the label of the most recent call:
key = qr.key(256)
print(qr.last_source) # "quantum-seeded", or e.g. "csprng-fallback (...)"
If a fresh quantum seed is unavailable (for example, briefly after a restart), the service falls back to the operating system's secure generator and says so in this label.
Get a Free API Key
curl -X POST https://quantumrand.dev/keys/create \
-H "Content-Type: application/json" \
-d '{"name": "Your Name", "email": "you@example.com"}'
Metadata
Release files for getquantumrand 1.0.2
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 |
|---|---|---|---|---|
| getquantumrand-1.0.2.tar.gz | 6.5 kB | Without provenance | Details for getquantumrand-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| getquantumrand-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for getquantumrand-1.0.2-py3-none-any.whl |
Total release size: 13.3 kB
Release files / getquantumrand-1.0.2.tar.gz
| Download URL | getquantumrand-1.0.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d27f48358c34b72748e023fc73899c79e6b4460cdcd39aeb7ec049ec09f6b12
|
|
BLAKE2b-256 checksum How to use checksums |
6f449da0edf7bafc5bbd0f696303035179f80b88b3cb29be05c6eced2f31ce76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.5
|
Release files / getquantumrand-1.0.2-py3-none-any.whl
| Download URL | getquantumrand-1.0.2-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fa618c8c7a0e99db15285bf4145b125e708f625efc6efedac3c15e82b823704
|
|
BLAKE2b-256 checksum How to use checksums |
25b3c636974b101aaafaf1475ba18bd24c7feaba08a55447d34dd8ce400530e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.5
|
Security for getquantumrand 1.0.2
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.