An unpredictable expansion of Python's random module, because random wasn't random enough.
Project description
(This was written by ChatGPT because i'm bad at markdown, please "check important info" or something)
🎲 RandomPlus
RandomPlus is a chaotic and fun expansion of Python’s built-in random module.
It adds weird, funny, and sometimes useful ways to generate randomness, because normal random just wasn’t random enough.
🚀 Installation
After uploading to PyPI, people will be able to install it with:
pip install randomplus
Or, if you’re just testing locally:
pip install .
🧩 Features
| Function | Description |
|---|---|
randstr(length=8, digits=1) |
Generate a random string of letters, digits, or both. |
maybe(prob=0.5) |
Returns True or False with a given probability. |
randomplus(step=0.000000000000001) |
Returns a random float rounded to a step size. |
randcase(text) |
Randomly flips the casing of each character. |
randlist(listlength=5, itemlength=5, digitsonly=True) |
Creates a list of random numbers or strings. |
randchar(min, max) |
Returns a random Unicode character between two code points. |
randrev(text) |
Reverses a random part of a string for utter chaos. |
🧠 Examples
import randomplus
print(randomplus.randstr()) # 'G5aKw8Xb'
print(randomplus.maybe()) # True or False
print(randomplus.randcase("hello")) # 'HeLLo'
print(randomplus.randrev("This is normal text.")) # 'This is nmroal text.'
⚠️ DISCLAIMER
If you do from randomplus import X then because some functions reference other functions in the module, it might not work.
💥 Bonus Fun
For maximum chaos:
print(randomplus.randrev(randomplus.randstr()))
🧑💻 About
Made by NoodleBoodle, the creator of RandomPlus, because the regular random module was just too calm.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file randmplus-1.0.0.tar.gz.
File metadata
- Download URL: randmplus-1.0.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f46b78b56b9da9dd137c503ec808958eab1ecd64cd2905d253fb0b2615aa99da
|
|
| MD5 |
bd9668818edfe5675772f0d68bc306ae
|
|
| BLAKE2b-256 |
f9884fafe32a861182665b8646b2ac28ebd4a5ed851efdc67b511286301ae4b5
|
File details
Details for the file randmplus-1.0.0-py3-none-any.whl.
File metadata
- Download URL: randmplus-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27362ee017f17ec2a07b5ec5534c59c89d60afdbb9509aefc49a67a8e22fecd0
|
|
| MD5 |
ad96632b87c9b1d27a74b6c6b642d3de
|
|
| BLAKE2b-256 |
131c54decfd9d83e79853298d5abe05ddc5eb6906ddaad5461dc1e4686c9b86d
|