Skip to main content

NonPseudoRandom

PyPI version Supported Python versions PyPI downloads

NonPseudoRandom is a Python package that generates true random numbers using sensor noise from your local system. It serves as a drop-in replacement for Python's native random module.

Supported Sensors

NonPseudoRandom utilizes various types of system sensors to generate randomness. The supported sensor types are as follows:

Sensor Type Description
CPU Temperature Measures the temperature of the CPU using psutil.
Microphone Noise Captures ambient noise from the microphone using sounddevice.
Webcam Noise Captures visual noise from the webcam using opencv-python.

Installation

You can install NonPseudoRandom via pip:

pip install nonpseudorandom

Usage

NonPseudoRandom can be used as a drop-in replacement for Python's built-in random module.
It inherites all methods of the native random class and therefore supports all of the expected functionalities.

Examples from native random methods:

import nonpseudorandom as random

print(random.random())  # Generate a random float in [0.0, 1.0)
print(random.randint(1, 10))  # Generate a random integer between 1 and 10
print(random.choice(['a', 'b', 'c']))  # Randomly select an element from a list
print(random.uniform(1.0, 10.0))  # Generate a random float between 1.0 and 10.0

my_list = [1, 2, 3, 4, 5]
random.shuffle(my_list)
print(my_list)  # The list will be shuffled

population = [1, 2, 3, 4, 5]
sample = random.sample(population, 3)
print(sample)  # Randomly sample 3 unique elements from the population

License

This project is licensed under the MIT License.

Metadata

Release files for nonpseudorandom 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonpseudorandom 0.3.0
File Size Uploaded
nonpseudorandom-0.3.0.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonpseudorandom 0.3.0
File Interpreter ABI Platform
nonpseudorandom-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / nonpseudorandom-0.3.0.tar.gz

Download URL nonpseudorandom-0.3.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
83562b8814d3038f3837b5a2312540db5eee03817e691432128197c5a6d1c05c
BLAKE2b-256 checksum
How to use checksums
644aa11ccfbb7b875d8ad8c838a3ec2016d9823ef8a680089046216b4d2e30c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / nonpseudorandom-0.3.0-py3-none-any.whl

Download URL nonpseudorandom-0.3.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
791acf9130122a9fd0dcb405f477eb3e6501ac4a9ca0f0d74203d4bc90ecb66c
BLAKE2b-256 checksum
How to use checksums
0be8a183f9d1c48ca836a4a0e49e9ef95cd8239de187acea688d847d89c8b744
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page