Skip to main content

True random numbers in Python

Project description


PyPI version Build Status codecov

True random numbers in Python.

Full documentation:


This module provides random.Random subclasses, so they implement all random functions (except Bookkeeping functions) with true randomness. They require an internet connection to work and will either raise a ConnectionError or a subclass of verarandom.errors.VeraRandomError for validation failures and other related error conditions.

>>> from verarandom import RandomOrg
>>> r = RandomOrg()

>>> r.quota_estimate
>>> r.randint(1, 10, n=5)
[3, 4, 10, 3, 7]
>>> r.quota_estimate  # bits were deducted from quota

>>> r.randint(3, 5, n=1)
>>> r.randint(-10, 3)  # a single number (like random.randint)

>>> r.random()
>>> r.choice(['rock', 'paper', 'scissors'])

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 verarandom, version 2.0.1
Filename, size File type Python version Upload date Hashes
Filename, size verarandom-2.0.1-py3-none-any.whl (6.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size verarandom-2.0.1.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page