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.13.0.tar.gz (2.9 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.13.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: playdice-2025.7.13.0.tar.gz
  • Upload date:
  • Size: 2.9 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.13.0.tar.gz
Algorithm Hash digest
SHA256 05a85db85c646b0c4679a90727210510b40c7631548b3c3a176f8068879f6458
MD5 576785ddc92ae95339825311b828870d
BLAKE2b-256 f3feab594ee39ce4596b620f509c8e251e57efba2d33443e177b5230d54bdaf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playdice-2025.7.13.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.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 748574344bc55d84c9fa11b0d8bec8fcc2d4d3c06cf035d18e9a252c21421f33
MD5 a7858b10f7d85c122e35c218df70b2a2
BLAKE2b-256 8cd9538d8eb5cebe73f8f325fec3ebce8ad3ce5c837a85e3fd1108b6254a31bf

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