Skip to main content

Async random number generator.

Project description


Utility for fetching one or more random numbers from the ANU Quantum Random Numbers Server by calling the endpoint at Requests are executed asynchronously using the tornado networking framework.

More information about how the numbers are generated can be found on

Requires tornado and its IOLoop to run.


Download the source and run the setup file:

python install


A simple example of generating a single random uint8:

def handle_random_int(f):

f = asyncrandom.fetch()


Multiple numbers can be generated as well. In this example we generate 10:

def handle_random_int(f):

f = asyncrandom.fetch(10)


By default, 8-bit unsigned integers are generated. Optionally, this can be changed to 16-bit. Example of generating 10 16-bit integers:

def handle_random_int(f):

f = asyncrandom.fetch(10, asyncrandom.IntegerType.UINT16)


If called from the command, issues a synchronous call to the service. Optionally, --length and --type can be specified as arguments, with default values of 1 and "uint-8" respectively.

Command line example:

$ asyncrandom --int-type=uint8 --length=1

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asyncrandom, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size asyncrandom-0.0.1-py3-none-any.whl (5.4 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size asyncrandom-0.0.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page