Skip to main content

No project description provided

Project description


======= version 2.0.7

A python package for evaluating dice rolls.


Dicey parses strings of dice rolls of the form:

'1d20 + 2 + 2d4 - 1d8 + 1 - min {3}'

Where min (or max) holds the value of the highest or lowest single die rolled and {3} is how many times to repeat the expression. [min|max] and {num} are optional. Dicey then rolls the specified dice, and computes the total. Valid arithmentic operators are + - * / (). Dicey will always translate individual die expressions to a randomized result before applying arithmetic operators.


pip install dicey


Command Line

  dicey <expression>

  -h --help  show this screen.

As a python package

from dicey.dieparser import DieParser

d = DieParser()
d.parse('1d20 + 1d4 + 2')
result = d.__str__()

# or of course simply:

Project details

Download files

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

Files for dicey, version 2.0.7
Filename, size File type Python version Upload date Hashes
Filename, size dicey-2.0.7-py3-none-any.whl (6.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dicey-2.0.7.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page