Skip to main content

Prove the outcome of randomness!

Project description

provrandom - Prove the outcome of randomness!

provrandom is a Python package that provides a fair random number generator designed for applications that would be able to use fair randomness. The package allows you to generate random numbers and information in a way that can be verified by both the server and the client, ensuring fairness and transparency in the process.

Features

  • Generate provably fair random numbers based on server seeds, client seeds, and nonces.
  • Easy-to-use interface for obtaining random numbers and related information.
  • Transparent and verifiable randomness to guarantee fairness in any applications.
  • Flexible customization of seeds and nonces for a wide range of use cases.

Installation

You can install provrandom using pip:

pip install provrandom

Usage:

from provrandom import Random

# Create an instance of the Random class
random_instance = Random()

# Example usage of methods:
print("Random information:", random_instance.random_information)
print("Random hash:", random_instance._hash())
print("Random number between 10 and 20:", random_instance.number(10, 20))
print("Random float between 1.0 and 5.0:", random_instance._float(1.0, 5.0))
print("Random string of length 8:", random_instance.string(8))

# Example usage of _random_container method to generate a list of random numbers
random_numbers_list = random_instance._random_container(list, 5, 0, 100)
print("Random numbers list:", random_numbers_list)

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

provrandom-0.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

provrandom-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file provrandom-0.0.1.tar.gz.

File metadata

  • Download URL: provrandom-0.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for provrandom-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1ff5ea4420d5636824496555535822c835dc706ccd713416fd03fcc7bb2879c7
MD5 0dee4d56b87c9a6ee03c05261f57cd11
BLAKE2b-256 391db62acd1e092cbdff42998e09aa57a621034a2ee75fc42257f6804ba53127

See more details on using hashes here.

File details

Details for the file provrandom-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: provrandom-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for provrandom-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a89dfde833b195a4e830f337bbfa44b22c82ef7e645e62fd324be95161347c6f
MD5 2d60806a6a7c4d7baca8afa54a2bfa52
BLAKE2b-256 327fa8a69868d579d5bfec1cbc87443001d9abd4a88e297bd6b007753b399250

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