{ "info": { "author": "StarlitGhost", "author_email": "pyhedrals@starlitghost.xyz", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Games/Entertainment", "Topic :: Games/Entertainment :: Role-Playing" ], "description": "# PyHedrals [![Build Status](https://travis-ci.org/StarlitGhost/pyhedrals.svg?branch=master)](https://travis-ci.org/StarlitGhost/pyhedrals)\n\nA library for evaluating tabletop dice roll expressions.\n\nUsed in the Mastodon bot [DiceCat](https://github.com/StarlitGhost/DiceCat), and the IRC bot [DesertBot](https://github.com/DesertBot/DesertBot)\n\n### Usage Overview\n\nSample usage:\n`5d6!>4 + (5d(2d10)dl - d10) * (d20 / 2) # for an unnecessarily complicated roll`\n\nSample output:\n`84 for an unnecessarily complicated roll`\n\nThere is also a verbose mode that outputs every individual die roll, that output looks like this:\n`[2d10: 2,5 (7) | 5d7: -1-,6,2,4,5 (17) | 1d10: 3 (3) | 1d20: 9 (9) | 5d6: 2,2,3,*5*,*5*,2,*5*,4 (28)] 84 for an unnecessarily complicated roll`\n\n### Supported Operators\n* Arithmetic: `+` `-` `*` `/` `%` `^` `()` (addition, subtraction, multiplication, division, modulus, exponent, parentheses)\n* Dice: `#d#` (eg, `3d6`, `d20`)\n * Rolls the left number of dice with the right number of sides. `3d6` rolls 3 six-sided dice\n * The first number is optional and defaults to 1 if omitted\n* Dice modifiers:\n * Keep/Drop Highest/Lowest: `kh#` `kl#` `dh#` `dl#`\n * Keeps/Drops only the # highest/lowest dice rolls. Any that are either not kept or dropped are removed from the total\n * The number is optional and defaults to 1 if omitted\n * Exploding: `!` `!#` `!>#` `!>=#` `!<#` `!<=#`\n * Each die that rolls maximum (`!`), or a specific number (`!#`), or over/under a threshold (`!>#` `!>=#` `!<#` `!<=#`), adds an additional die to the pool\n * This repeats for each die added to the pool\n * Reroll: `r` `r#` `r>#` `r>=#` `r<#` `r<=#`\n * Drops and rerolls each die that rolls minimum (`r`), or a specific number (`r#`), or over/under a threshold (`r>#` `r>=#` `r<#` `r<=#`)\n * This repeats for each die rerolled. You can make it only reroll each die once with `ro` instead of `r`\n * Count: `c` `c#` `c>#` `c>=#` `c<#` `c<=#`\n * Counts the number of dice that roll maximum (`c`), or a specific number (`c#`), or over/under a threshold (`c>#` `c>=#` `c<#` `c<=#`)\n * Sorting: `s` `sa` `sd`\n * Sorts the dice rolls in ascending (`s` `sa`) or descending (`sd`) order\n * This still applies in non-verbose mode but you won't see any visible effect\n* Comments: `# your comment here`\n * Adds a comment to the end of the output, so you can describe what the roll is for. eg: `d20+5 # for initiative`\n * The `#` is a literal hash, not a number this time :)\n\nIf you have more ideas for operators, suggestions and pull requests are welcome!\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/StarlitGhost/pyhedrals", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyhedrals", "package_url": "https://pypi.org/project/pyhedrals/", "platform": "", "project_url": "https://pypi.org/project/pyhedrals/", "project_urls": { "Homepage": "https://github.com/StarlitGhost/pyhedrals" }, "release_url": "https://pypi.org/project/pyhedrals/0.2.0/", "requires_dist": [ "sly (>=0.3)" ], "requires_python": ">=3.6", "summary": "A library for evaluating tabletop dice roll expressions", "version": "0.2.0" }, "last_serial": 5104336, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cd674a56e6872c1380ce0c9c4422189e", "sha256": "4a432165e06a9f89566800ad124b899108192be633bbf3ca021a631dc441e1a8" }, "downloads": -1, "filename": "pyhedrals-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cd674a56e6872c1380ce0c9c4422189e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6167, "upload_time": "2018-08-22T10:12:01", "url": "https://files.pythonhosted.org/packages/45/eb/0ef92c834795fd92733c10c9b8d6a99cf7d45f771b61623c8b6526743733/pyhedrals-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e81763514901a5f0400e4df036a37cb7", "sha256": "aefcb5624d15da0ed9220f9dec98a4bffe3f69256904980f828c27bb99b2f16f" }, "downloads": -1, "filename": "pyhedrals-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e81763514901a5f0400e4df036a37cb7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5824, "upload_time": "2018-08-22T10:12:02", "url": "https://files.pythonhosted.org/packages/4e/e9/1421bc497758e0762ab2892b39c99cd0f96a8820af27a20da464510b0e6f/pyhedrals-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "81441686afafb46caa716a06cd222c3a", "sha256": "3eeb40b773992af1d2fb08c6ec19584197fab54d15d767c2f7f3a09d1e5da92c" }, "downloads": -1, "filename": "pyhedrals-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "81441686afafb46caa716a06cd222c3a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6226, "upload_time": "2018-08-22T22:25:35", "url": "https://files.pythonhosted.org/packages/6b/97/1c036270ff7d173e9d1ba0cc06df45cab0774f2dde4e2062e0e8309675f6/pyhedrals-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "674bd5a7fdbc2e39a665d2669cf17fe0", "sha256": "8c7d941e62bf6c45c9db1e348c6248f3c60ed9957ac97bda7339661ae3441a8d" }, "downloads": -1, "filename": "pyhedrals-0.0.2.tar.gz", "has_sig": false, "md5_digest": "674bd5a7fdbc2e39a665d2669cf17fe0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5877, "upload_time": "2018-08-22T22:25:37", "url": "https://files.pythonhosted.org/packages/73/e1/79cd91a134f61b1dec50522c5cc50887c5d685f133c464df6281d1705604/pyhedrals-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "889e3e87eb3894bf58220cb7d4019feb", "sha256": "74412b6cc7493a839c2ec9fba32b343a1ab41ed3e3f00377ce207c332f330223" }, "downloads": -1, "filename": "pyhedrals-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "889e3e87eb3894bf58220cb7d4019feb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7108, "upload_time": "2018-11-28T17:30:38", "url": "https://files.pythonhosted.org/packages/04/c0/4c29fca0988f570101d758ba044a2dfbc5663c7647a3e2fc9274769dc5e6/pyhedrals-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f1f560fae1a6ea382fe7e5e6a3cb6fe", "sha256": "c7d6060a33c3ae40c8fa5fb020b0cdf8f9fa98e746fe21d8fc41b73e14962c6d" }, "downloads": -1, "filename": "pyhedrals-0.0.3.tar.gz", "has_sig": false, "md5_digest": "6f1f560fae1a6ea382fe7e5e6a3cb6fe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5989, "upload_time": "2018-11-28T17:30:41", "url": "https://files.pythonhosted.org/packages/de/60/13e5f944a94f7197536938926401f9ed7d5e94ea96d28f168cf6eeaa49d1/pyhedrals-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "bcef4eee1e0fd15ff6b817da9efe86c8", "sha256": "ba87be5b348915592db372812fe7c4cae563f0a464d07b18013a95c2fcd35952" }, "downloads": -1, "filename": "pyhedrals-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bcef4eee1e0fd15ff6b817da9efe86c8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7109, "upload_time": "2018-11-28T18:17:07", "url": "https://files.pythonhosted.org/packages/fb/a3/a9d444649d80f2f057c27c1512f4ca23caaafca12e9a7b224d5bfbf555aa/pyhedrals-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6cb6014644655dc68ed21bedd4c1433b", "sha256": "31d629c4c535ae31e01df0ef364a540b845433f5d33f9a1b38827ff0bea2e04d" }, "downloads": -1, "filename": "pyhedrals-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6cb6014644655dc68ed21bedd4c1433b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6000, "upload_time": "2018-11-28T18:17:10", "url": "https://files.pythonhosted.org/packages/86/61/8dc9eb7f66133c89adcdc386bf583097664d501d039f5e75f1c655514b72/pyhedrals-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4ef48eefab2c58ddf5162a70eeb2c4ad", "sha256": "dda7591cf25b3f914e8ea06d1b2bcc410b64cefbe03c122a3742a8ad4b9880cc" }, "downloads": -1, "filename": "pyhedrals-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4ef48eefab2c58ddf5162a70eeb2c4ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7104, "upload_time": "2018-12-14T20:43:47", "url": "https://files.pythonhosted.org/packages/87/8c/98082b6eef2692b47b1d6929b8b8e0decb51073eb5c476a92ce9fbb8f9f2/pyhedrals-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f461e956d354de70e5688e5b9638c236", "sha256": "67a6e25fa0721c092cd119307e82c77cbf20e794f8ef2067e6c1bcc63ddfc78c" }, "downloads": -1, "filename": "pyhedrals-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f461e956d354de70e5688e5b9638c236", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6004, "upload_time": "2018-12-14T20:43:51", "url": "https://files.pythonhosted.org/packages/ec/ed/857f94dbd63dedfb2c5576e12a9a658832c7700b76b1f43d94265013e2c2/pyhedrals-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "db7e9ccdcecfab436f8be01a5c5a8119", "sha256": "c431b6879015b7c531633508bdc43bb76c93ad820f2de1f247c479194501ad4a" }, "downloads": -1, "filename": "pyhedrals-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "db7e9ccdcecfab436f8be01a5c5a8119", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7229, "upload_time": "2018-12-18T04:32:11", "url": "https://files.pythonhosted.org/packages/17/4c/d07099acb0f43148824657cacbfcf2262709657c5028d3fe5789d5bbb0db/pyhedrals-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ab79ca15f7bce41d5e170344e3595643", "sha256": "f70b0fa0479bda09a6e8e50386bc2a04e7d1c54105a6307ddf9d1c2218017f67" }, "downloads": -1, "filename": "pyhedrals-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ab79ca15f7bce41d5e170344e3595643", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6132, "upload_time": "2018-12-18T04:32:15", "url": "https://files.pythonhosted.org/packages/ee/03/b3c5a7d16eb7ca212739f5a1270703f8d6f9ccaa763ea7c901173a650d32/pyhedrals-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "cc6f567cda9296418bc9976f3fe244d4", "sha256": "90ecbc1d352e7a459d4fb365bc3c7f097bf563f0573b56265361e50542b08948" }, "downloads": -1, "filename": "pyhedrals-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cc6f567cda9296418bc9976f3fe244d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7377, "upload_time": "2019-04-05T15:42:41", "url": "https://files.pythonhosted.org/packages/60/17/adefb957c1dcf39d2a0aab957adf439de9a0e63e71581f2f51294094736f/pyhedrals-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b0d12005fcee9875840fac627d62fdfe", "sha256": "bbbb4fe25fbd056669417943bbf18d16faed44a435102c6e87fcfe5580e3c669" }, "downloads": -1, "filename": "pyhedrals-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b0d12005fcee9875840fac627d62fdfe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6263, "upload_time": "2019-04-05T15:42:46", "url": "https://files.pythonhosted.org/packages/9d/bb/82de26b7f4fe4433dd0134de1be3b2a462ad1fd83db1cfa4a0a566c4698f/pyhedrals-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cc6f567cda9296418bc9976f3fe244d4", "sha256": "90ecbc1d352e7a459d4fb365bc3c7f097bf563f0573b56265361e50542b08948" }, "downloads": -1, "filename": "pyhedrals-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cc6f567cda9296418bc9976f3fe244d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7377, "upload_time": "2019-04-05T15:42:41", "url": "https://files.pythonhosted.org/packages/60/17/adefb957c1dcf39d2a0aab957adf439de9a0e63e71581f2f51294094736f/pyhedrals-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b0d12005fcee9875840fac627d62fdfe", "sha256": "bbbb4fe25fbd056669417943bbf18d16faed44a435102c6e87fcfe5580e3c669" }, "downloads": -1, "filename": "pyhedrals-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b0d12005fcee9875840fac627d62fdfe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6263, "upload_time": "2019-04-05T15:42:46", "url": "https://files.pythonhosted.org/packages/9d/bb/82de26b7f4fe4433dd0134de1be3b2a462ad1fd83db1cfa4a0a566c4698f/pyhedrals-0.2.0.tar.gz" } ] }