{ "info": { "author": "CMSteffen", "author_email": "cmsteffen@protonmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# DiceLib\nA dice-rolling library for RPGs.\n\n## Requirements\n* Python 3.5 or newer.\n\n## Installation\n`pip install DiceLib`\n\n## Usage\n```python\n>>> from DiceLib import Die\n>>> # You can create custom dice by specifying the number of faces:\n... d6 = Die(6)\n>>> # Rolling dice is simple:\n... d6.roll()\n[6]\n>>> d6.roll(2)\n[3, 5]\n>>> d6.roll(7)\n[2, 2, 6, 4, 4, 3, 1]\n>>> # The value returned might look like a list, and in many way acts like one,\n... # but it's actually a special class called Rolls:\n... roll = _\n>>> type(roll)\n\n>>> # Rolls act like lists in many ways:\n... roll\n[2, 2, 6, 4, 4, 3, 1]\n>>> roll[1:3]\n[2, 6]\n>>> roll[1:3] = [5, 5]\n>>> roll\n[2, 5, 5, 4, 4, 3, 1]\n>>> roll[0] = 6\n>>> roll\n[6, 5, 5, 4, 4, 3, 1]\n>>> # But in other ways, Rolls are different:\n... roll.total\n28\n>>> roll.count\n7\n>>> roll.highest\n6\n>>> roll.lowest\n1\n>>> roll[2:5].highest\n5\n>>> roll[2:5].total\n13\n>>> roll < 20\nFalse\n>>> roll > 20\nTrue\n>>> roll == 28\nTrue\n>>> int(roll)\n28\n>>> # You can easily add or subtract from a roll:\n... roll + 2\n30\n... roll - 8\n20\n>>> # You can even drop the lowest or highest rolls:\n... roll.drop_lowest()\n[6, 5, 5, 4, 4, 3]\n>>> roll.drop_lowest(3)\n[6, 5, 5, 4]\n>>> roll.drop_highest()\n[5, 5, 4, 4, 3, 1]\n>>> roll.drop_highest(3)\n[4, 4, 3, 1]\n>>> # Which makes it easy, for example, to roll stats:\n... stats = dict()\n>>> for stat in [\"str\", \"dex\", \"con\", \"int\", \"wis\", \"cha\"]:\n... stat_roll = int(d6.roll(4).drop_lowest())\n... stats[stat] = stat_roll\n...\n>>> stats\n{'str': 12, 'dex': 15, 'con': 14, 'int': 12, 'wis': 15, 'cha': 11}\n```\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/rolecraft/DiceLib", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "DiceLib", "package_url": "https://pypi.org/project/DiceLib/", "platform": "", "project_url": "https://pypi.org/project/DiceLib/", "project_urls": { "Homepage": "https://github.com/rolecraft/DiceLib" }, "release_url": "https://pypi.org/project/DiceLib/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "A dice-rolling library for RPGs.", "version": "0.2.0" }, "last_serial": 5194990, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ac3a5bf7ed0b4c96b38de2cc0f03dd61", "sha256": "ac6449707d890f23c318326a0b304c290d50d2fc30e9c552351c9270ba25d972" }, "downloads": -1, "filename": "DiceLib-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ac3a5bf7ed0b4c96b38de2cc0f03dd61", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4356, "upload_time": "2019-04-26T20:47:54", "url": "https://files.pythonhosted.org/packages/20/f1/38a043e3e4c3726949e28eca046ab9c93158ee3c1d2456961e4cc2652ef5/DiceLib-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6096c5a2bb2e3b4c5e2d7d8d32cdfd3", "sha256": "781e3b502aa2b9bdd64d72255fcd6973eda355038ae92c7c220eeebccc964be0" }, "downloads": -1, "filename": "DiceLib-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d6096c5a2bb2e3b4c5e2d7d8d32cdfd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2871, "upload_time": "2019-04-26T20:48:04", "url": "https://files.pythonhosted.org/packages/49/7e/8bc048165322eb980181cd4d2e18e1ac0b40fb5b7e253adf3f14a6b414ef/DiceLib-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ee7814e9bc98c284eed485221717074d", "sha256": "65a9cca0cb1db2d8e99e06fd61206dbfc0f79cfbca78d7d755b74ce0dd8a49eb" }, "downloads": -1, "filename": "DiceLib-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ee7814e9bc98c284eed485221717074d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4430, "upload_time": "2019-04-26T21:41:34", "url": "https://files.pythonhosted.org/packages/29/d9/1931401cc9c1c01e2f5cb16f4d75068caa9a3279e40a64ec67ca7b5a0879/DiceLib-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "baf200230331a8a1f2377dedf635cbd3", "sha256": "ca782520bb21fab27753ae2b056270664327c2f77175c7bcda6700711918bd30" }, "downloads": -1, "filename": "DiceLib-0.2.0.tar.gz", "has_sig": false, "md5_digest": "baf200230331a8a1f2377dedf635cbd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2967, "upload_time": "2019-04-26T21:41:36", "url": "https://files.pythonhosted.org/packages/b6/b4/5a57b7d06933596f8bfa0a4e78019d146a1bd583752cf4ca4e45758dbd24/DiceLib-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee7814e9bc98c284eed485221717074d", "sha256": "65a9cca0cb1db2d8e99e06fd61206dbfc0f79cfbca78d7d755b74ce0dd8a49eb" }, "downloads": -1, "filename": "DiceLib-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ee7814e9bc98c284eed485221717074d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4430, "upload_time": "2019-04-26T21:41:34", "url": "https://files.pythonhosted.org/packages/29/d9/1931401cc9c1c01e2f5cb16f4d75068caa9a3279e40a64ec67ca7b5a0879/DiceLib-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "baf200230331a8a1f2377dedf635cbd3", "sha256": "ca782520bb21fab27753ae2b056270664327c2f77175c7bcda6700711918bd30" }, "downloads": -1, "filename": "DiceLib-0.2.0.tar.gz", "has_sig": false, "md5_digest": "baf200230331a8a1f2377dedf635cbd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2967, "upload_time": "2019-04-26T21:41:36", "url": "https://files.pythonhosted.org/packages/b6/b4/5a57b7d06933596f8bfa0a4e78019d146a1bd583752cf4ca4e45758dbd24/DiceLib-0.2.0.tar.gz" } ] }