The ultimate Python library for decision-making algorithms, spinner wheels, weighted sampling, dice notation, and team generators.
Project description
🎲 decision-kit (Python)
The ultimate zero-dependency Python library for decision-making algorithms, spinner wheels, weighted sampling, dice notation, and team generators.
🚀 Overview
decision-kit provides fast, battle-tested algorithms and data structures to build decision-making applications, tabletop RPG tools, and random selection systems in Python.
Maintained and sponsored by Entscheidomat.com — the free online decision suite.
🌐 Interactive Web Demos
Try these online decision tools powered by Entscheidomat.com:
- 🎡 Glücksrad / Wheel of Fortune
- ❓ Ja / Nein Generator
- 🎲 3D Würfel Simulator
- 🪙 Münzwurf Simulation
- 🎱 Magic 8-Ball Orakel
- 🏷️ Namen Auslosung & Team Generator
- 🔢 Zufallszahl Generator
📦 Installation
pip install decision-kit
💡 Usage
from decision_kit import AliasMethod, DiceEngine, TeamBalancer, CoinFlipEngine
# 1. Weighted Random Selection (O(1) Alias Algorithm)
items = [
{"id": "A", "label": "Common Item", "weight": 70},
{"id": "B", "label": "Rare Item", "weight": 25},
{"id": "C", "label": "Legendary Item", "weight": 5},
]
alias = AliasMethod(items)
winner = alias.next()
print("Won:", winner["label"])
# 2. Tabletop RPG Dice Parser
roll = DiceEngine.roll("3d6+2")
print(roll["total"], roll["breakdown"])
# 3. Fair Team Generator
teams = TeamBalancer.divide_teams(["Anna", "Ben", "Clara", "Dan"], team_count=2)
print(teams)
# 4. Coin Flip
coin = CoinFlipEngine.flip("de")
print(coin["side"])
🖥️ CLI Tool
# Pick random winner
decision-kit pick "Pizza" "Sushi" "Burger"
# Roll dice
decision-kit roll 2d6+3
# Flip coin
decision-kit flip
📄 License
MIT © Entscheidomat
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 entscheidomat_decision_kit-1.0.0.tar.gz.
File metadata
- Download URL: entscheidomat_decision_kit-1.0.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecdc1de818b7d0a147b4af247db4fb9addc483cdb8087d8f8de0f5d12b6b0e33
|
|
| MD5 |
e81f73daabc43292d6af11a18165f6d8
|
|
| BLAKE2b-256 |
49477f8825beec8856a703954bfc3b3beefae1ee8941e5ce20cbf6bdff5304f5
|
File details
Details for the file entscheidomat_decision_kit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: entscheidomat_decision_kit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b742a9fdc10fa92bff592557e6583b31fc17688f0fcddcb120400b525046e2d5
|
|
| MD5 |
144003bf299633ae4cd151fae4fc05a6
|
|
| BLAKE2b-256 |
dec5fea01803f60b0dbd58212eeacc9df7ef322849ae2495fe05467c7aceeb62
|