Skip to main content

Tabletop RPG Dice roller

Project description

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

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

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

dicetray-1.2.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

dicetray-1.2.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file dicetray-1.2.1.tar.gz.

File metadata

  • Download URL: dicetray-1.2.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for dicetray-1.2.1.tar.gz
Algorithm Hash digest
SHA256 cc73d70974ed1de77233c116a5e7fa723f68e48c90c4cc50b8677cd39c82c95f
MD5 4eac4b0b5fd6f29d750875c6de536bb9
BLAKE2b-256 cc8637afede5a00de3e85305fb77904534fe869cd515bf59868133b4e7deb063

See more details on using hashes here.

File details

Details for the file dicetray-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: dicetray-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for dicetray-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cab5d6d9dee6a171e7aae67ee876ef9ac2ec26795ad92b588087eae5671343d3
MD5 346ed06b5147d137c245f97c82b277d1
BLAKE2b-256 5215a0d32d68d45ea8b69b4981d37d898c311c54883e28b6a02e377af5a70c01

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page