Skip to main content

A Python interface to the ANU Quantum Random Numbers Server

Project description

This module provides a Python interface to The ANU Quantum Random Number Generator JSON API.

Usage

>>> import quantumrandom
>>> quantumrandom.get_data()
[26646]
>>> quantumrandom.get_data(data_type='uint16', array_length=5)
[42796, 32457, 9242, 11316, 21078]
>>> quantumrandom.get_data(data_type='hex16', array_length=5, block_size=2)
['f1d5', '0eb3', '1119', '7cfd', '64ce']

Valid data_type values are uint16 and hex16, and the array_length and block_size cannot be larger than 100. If for some reason the API call is not successful, or the incorrect amount of data is returned from the server, this function will raise an exception.

warning:

Due to the lack of an SSL/TLS interface at the moment, all data is sent over the wire in clear text.

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

quantumrandom-1.3.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file quantumrandom-1.3.tar.gz.

File metadata

  • Download URL: quantumrandom-1.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for quantumrandom-1.3.tar.gz
Algorithm Hash digest
SHA256 2d1d8c0bcf4be76616e169bd5000b99d454d363d310bef5c855bd8b7ba7d3465
MD5 13811e4548cc0e0d967a8d8a2c23f02d
BLAKE2b-256 742910bb7cf908a0a7eee25e0bdc7ad2907ddb20e870eba3fdf7cb65464768ef

See more details on using hashes here.

Provenance

Supported by

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