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.

This library uses system random generator in order to have truely random dice rolls.

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.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

dicetray-1.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dicetray-1.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for dicetray-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4fec34653e0bf1aee54cf8c0c95a652011892d55f1c729ffc9b780b5838f9a6e
MD5 57b79250b99aadd6981ccc7a6dd1bcaa
BLAKE2b-256 4d1c702c7d441c6819efc71f6bbccdebc1255859a72ea68f55601ce3aa3beca0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dicetray-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for dicetray-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c365e2e3d7ba7e2c48488ea65e014b5a133ee7227386cde595bde5d353e1413c
MD5 c97ee347c9e33f7a0ad5e2be506ae627
BLAKE2b-256 db9773caee38ee976ab2fbe8bbf95fbdae35e10c05740c70b366aba50c6d36ef

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