Skip to main content
https://github.com/gtmanfred/dicetray/workflows/Tests/badge.svg https://img.shields.io/codecov/c/github/gtmanfred/dicetray https://img.shields.io/pypi/v/dicetray https://img.shields.io/pypi/l/dicetray https://img.shields.io/pypi/dm/dicetray

Tabletop RPG Dice rolling manager for handling Standard Dice Notation

Grammer

Below is the grammer that is used by the parser generator to intepret inputs.

statementexpr
expr PLUS expr
expr MINUS expr
expr TIMES expr
expr DIVIDE expr
exprNUMBER
dice
func
funcdice
dice KEEPHIGH
dice KEEPLOW
dice DROPHIGH
dice DROPLOW
dice KEEPHIGH NUMBER
dice KEEPLOW NUMBER
dice DROPHIGH NUMBER
dice DROPLOW NUMBER
diceNUMBER DIE NUMBER
NUMBER DIE TYPE

PLUS : + MINUS : - TIMES : * DIVIDE : /

NUMBER: [0-9]+ TYPE: [fF%] DIE : d KEEPHIGH: kh KEEPLOW: kl DROPHIGH: dh DROPLOW: dl

Example

>>> from dicetray import Dicetray
>>> Dicetray('1d20 + 3').roll()
15
>>> Dicetray('4d6dl').roll()
10
>>> Dicetray('4d6kh3').roll()
12
>>> d = Dicetray('2d20kh + 1d4 + 3')
>>> d.result
>>> d.dice
set()
>>> d.roll()
18
>>> d.dice
{<Dice (d20): 14>, <Dice (d20): 14>, <Dice (d4): 1>}
>>> d.result
18

Metadata

Release files for dicetray 2.1.1

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

Source distribution (sdist)

Source distribution for dicetray 2.1.1
File Size Uploaded Provenance
dicetray-2.1.1.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 10.0 kB

Release files / dicetray-2.1.1.tar.gz

Download URL dicetray-2.1.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
db5cd40ef9e1d046101f651e00309fec44ad8e380060d2673437f7f5ee81ac4d
BLAKE2b-256 checksum
How to use checksums
afbc070b7ccc3d3283ca0a467c98e5c116d9046796a19eac411f455fbaffe6f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / dicetray-2.1.1-py3-none-any.whl

Download URL dicetray-2.1.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
152d53b43b66979e7f9add3a331b9a2d8e241135832f70df2cf307134fe98b05
BLAKE2b-256 checksum
How to use checksums
8d46bbc6a7fec7860f4161a381031570f0ea565841b1d97f6fcd229a92650f6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Security for dicetray 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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