Skip to main content

A Python wrapper to the Random.Org service.

Project description

A Python Interface to the Random.org web service. Provides a python wrapper to the following Random.org API calls:

  • INTEGERS

  • SEQUENCE

  • STRING

  • QUOTA

See below for usage examples.

DEPENDENCIES

  • Numpy

This is known to work using IPython (v0.13) and Python (2.7.3).

INSTALLATION

Install with pip by running:

pip install randorg

See below for usage examples.

USAGE EXAMPLES

The package can be used as follows:

import randomorg as ro

# Generate 5 integers between 1 and 100
ro.integers(5, minimum=1, maximum=100, base=10)

# Generate a random sequence of integers between 1 and 10
ro.sequence(minimum=1, maximum=10)

# Generate 5 unique strings (e.g. passwords) of 10 characters each
ro.string(num=5, length=10, digits=True, upper=True,
                        lower=True, unique=True)

# Check your quota
ro.quota()

That pretty much sums up the functions included in the random.org api. More information on the random.org api can be found here.

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

RandOrg-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file RandOrg-0.1.0.tar.gz.

File metadata

  • Download URL: RandOrg-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for RandOrg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6224b7e32cf67b2d07823003c174818defe1da725069da1a9ff50842bd1304a5
MD5 bf6136bf641b842905a7632196d66d8c
BLAKE2b-256 2b0d6d6b77056fa6e9adee2c8c95155ddbd884e3285e9aa9a70428315edf4dac

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