Skip to main content

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


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.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

getquantumrand-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file getquantumrand-1.0.0.tar.gz.

File metadata

  • Download URL: getquantumrand-1.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for getquantumrand-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e27cf54e97488022ec8da0f8c626e40ede9b6a9aaaabc19c7d4cdcbed793a48f
MD5 67a98515ef15bf4d722c4202057aa909
BLAKE2b-256 fe7de9f72f11cfe97eb5ec1916e8c581e5f839ea459697c1a5141fc0b45ae747

See more details on using hashes here.

File details

Details for the file getquantumrand-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for getquantumrand-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7b4b2f37a47a1f333273f84a88db60a972aba86232bf4d6df4400bea63c04de
MD5 42562627c6f1153dde0f2b220b003566
BLAKE2b-256 08304de59b2d6d155d0947d4673b0ab2e1b6a1ed6d9dec0840d66e29f30ecb1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page