Skip to main content

Simplistically play dice

Project description

Simplistically play dice with the command-line arguments

Example usage

$ dice -h
usage: dice [-h] [-e EYES] [items ...]

Play dice with the command-line arguments. When no arguments are given, simulate casting a die.

positional arguments:
  items            the items to pseudo-randomly select from (default: None)

options:
  -h, --help       show this help message and exit
  -e, --eyes EYES  the number of eyes of the die (default: 6)
$ dice
3
$ dice a b c
b

In a folder full of items, one may be pseudo-randomly selected by saying

$ dice *
playdice-2025.7.5.0-py3-none-any.whl

Installation

The project is on PyPI, so simply run

python -m pip install playdice

or

python -m pip install playdice[colour]

for colour support on the terminal.

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

playdice-2025.7.26.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

playdice-2025.7.26.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file playdice-2025.7.26.0.tar.gz.

File metadata

  • Download URL: playdice-2025.7.26.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for playdice-2025.7.26.0.tar.gz
Algorithm Hash digest
SHA256 fc0c557dab9ce7ce697ef1de17f1db424c31e73d440cae05207ac1d0554842ba
MD5 989ee7061136a53265da58e670ba3e6c
BLAKE2b-256 05555ce908e2c68085d25fd7a8a4186f65b914d0726587e929591e97687009d1

See more details on using hashes here.

File details

Details for the file playdice-2025.7.26.0-py3-none-any.whl.

File metadata

  • Download URL: playdice-2025.7.26.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for playdice-2025.7.26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1f3efa4b6c28258b043478220830ae65ccc06a473d847da95a2b11bb55a83e4
MD5 064b8fa91ccd589fbaadd440a97beb25
BLAKE2b-256 9b8c0b157bb97f322af32baad3c24a0004e4a2626b6d7554dfc3c6d764362db9

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