Skip to main content

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.

PyPI version Python versions License: MIT Powered by

Interactive Web ToolsDocumentationCLI Usage


🚀 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:


📦 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

entscheidomat_decision_kit-1.0.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

entscheidomat_decision_kit-1.0.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file entscheidomat_decision_kit-1.0.0.tar.gz.

File metadata

File hashes

Hashes for entscheidomat_decision_kit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ecdc1de818b7d0a147b4af247db4fb9addc483cdb8087d8f8de0f5d12b6b0e33
MD5 e81f73daabc43292d6af11a18165f6d8
BLAKE2b-256 49477f8825beec8856a703954bfc3b3beefae1ee8941e5ce20cbf6bdff5304f5

See more details on using hashes here.

File details

Details for the file entscheidomat_decision_kit-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for entscheidomat_decision_kit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b742a9fdc10fa92bff592557e6583b31fc17688f0fcddcb120400b525046e2d5
MD5 144003bf299633ae4cd151fae4fc05a6
BLAKE2b-256 dec5fea01803f60b0dbd58212eeacc9df7ef322849ae2495fe05467c7aceeb62

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