Skip to main content

Dicey

======= version 2.0.7

A python package for evaluating dice rolls.

Description

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.

Installation

pip install dicey

Usage

Command Line

Usage:
  dicey
  dicey <expression>

Options:
  -h --help  show this screen.

As a python package

from dicey.dieparser import DieParser

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

# or of course simply:
print(d)

Release files for dicey 2.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dicey 2.0.7
File Size Uploaded
dicey-2.0.7.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dicey 2.0.7
File Interpreter ABI Platform
dicey-2.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / dicey-2.0.7.tar.gz

Download URL dicey-2.0.7.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ccbc89b7e3f7173289528759af872785332062cb0eedd9edd4daeb849628188c
BLAKE2b-256 checksum
How to use checksums
4bf4daadf6a7dc087d45a3d0bbf96aca8dd191398f7809dcc0ab36b042c3a285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

Release files / dicey-2.0.7-py3-none-any.whl

Download URL dicey-2.0.7-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70b8f705eba737fe5c4c675f9a6aedc8c31ab28937aab1941e4e2bc80fd292b6
BLAKE2b-256 checksum
How to use checksums
944eb62660b537729cd60559da980fe6666d43e162678060e66bce87b650d445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

Release history Release notifications | RSS feed

This release

2.0.7 This release

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page