Python SDK for the QuantumRand API — true quantum randomness as a service
Project description
getquantumrand — Python SDK
True quantum randomness as a service.
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="origin_cloud", # or "aer_simulator", "origin_wuyuan"
timeout=30.0,
)
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"}'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
getquantumrand-1.0.1.tar.gz
(5.7 kB
view details)
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 getquantumrand-1.0.1.tar.gz.
File metadata
- Download URL: getquantumrand-1.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff023548b347d52ea98e35aeb67a9a759ecfea5f877adb415aac3fb1dfc5f68f
|
|
| MD5 |
4b9ffe101246c2454619fd3f46962a75
|
|
| BLAKE2b-256 |
469014e03b1ed7417ecbfead9cdc69d60b9412ead94008806ee9c8d61ba517da
|
File details
Details for the file getquantumrand-1.0.1-py3-none-any.whl.
File metadata
- Download URL: getquantumrand-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ad5eec7706bc25809a31aab8cec84aa80a76e42adec13fb860a26448dee60e6
|
|
| MD5 |
b127797458b664bcee77d1bfb9ea63a1
|
|
| BLAKE2b-256 |
12edac36e294d1087978bced5427e465a5f8cb31728c351ca33740a20d355ff3
|