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.5.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.5.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: playdice-2025.7.5.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.3

File hashes

Hashes for playdice-2025.7.5.0.tar.gz
Algorithm Hash digest
SHA256 58e507b3faf69fd5655a30b507888fa24c77086373ba228fca2469882a063f82
MD5 0d0717c4b124bca75614dcf315b5e2a1
BLAKE2b-256 8b6fcbb036ab69541ecec5d52fa4ab216d635c1c20dc72a1c8bd283ee850d285

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playdice-2025.7.5.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.3

File hashes

Hashes for playdice-2025.7.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd4dc1294422a71d743e0db6670217630042e5fe79d7b98eaf037e2c97c696f
MD5 7ff2f71f876f1e17aa2bf3f13219e5d5
BLAKE2b-256 28a7a4e8d81842f2a5dc5a26eff3bc3f5dcc6934171e57c1ef2ab642f8927f18

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