A simple dice roller library
Project description
Konso's Dice Roller
A simple dice roller library I made for kicks.
Installation
pip install --upgrade konso-dice-roller
Usage
from konso_dice_roller import markdown_roll_string_from_input, roll_string_from_input
if __name__ == '__main__':
print(roll_string_from_input("2d20+3"))
print(roll_string_from_input("3d6>=5"))
print(markdown_roll_string_from_input("3d8-2"))
print(markdown_roll_string_from_input("2d10=2"))
result = roll_string_from_input(
input_string="100d1",
number_of_dice_limit=50,
dice_sides_limit=20,
bonus_absolute_value_limit=1_000,
)
Example output:
2d20+3, tulos: [10 15] + 3 = 28
3d6>=5, tulos: [3 5 3] = 1
`3d8-2`, tulos: `[3 5 3] - 2 = 9`
`2d10=2`, tulos: `[4 1] = 0`
ValueError: Liian monta noppaa
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
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 konso_dice_roller-0.0.6.tar.gz.
File metadata
- Download URL: konso_dice_roller-0.0.6.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
913bfe944c0fa4776e1d4f17f30b157eba16514bb9ff0d268504784313eb4dca
|
|
| MD5 |
efc33c1e34654f5c92719017cc393cea
|
|
| BLAKE2b-256 |
8ecf7e87aef19d1ceb90cbf3f2197720c142c001a7acec489223017cb2f1e993
|
File details
Details for the file konso_dice_roller-0.0.6-py3-none-any.whl.
File metadata
- Download URL: konso_dice_roller-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb4827f8e1bf1f6ca3bd4e5cbfa3d50fd6d527579657b22e1f4303afb9c55e0
|
|
| MD5 |
4581a918de5d05922d5143c235ecf619
|
|
| BLAKE2b-256 |
37065ef455fcc5429bd43767e3c3cb08dc8e007c1ca0658a393e7c29e825f012
|