PKG-INFO 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Metadata-Version: 1.2
  2. Name: xdice
  3. Version: 1.0.0
  4. Summary: Lightweight python library for managing xdice, scores, and xdice-notation patterns.
  5. Home-page: https://github.com/cro-ki/xdice
  6. Author: Olivier Massot
  7. Author-email: croki.contact@gmail.com
  8. License: GNU
  9. Description: **xdice**
  10. *xdice* is a lightweight python library for managing dice, scores, and dice-notation patterns.
  11. It allows to easily interpret literal expressions as rolls of dice ('1d6', '3d4+3', '12d6+1d4'...etc.), then manipulate the results.
  12. #### Python Versions
  13. DiceRollParser has been tested with python 3.3+
  14. ### Documentation
  15. See the **[full documentation](https://xdice.readthedocs.io/en/latest/)**
  16. #### Examples:
  17. import dice
  18. ## Roll simple dices with **rolldice()**
  19. score = rolldice(6, amount=2)
  20. # manipulates score as an integer
  21. print( score, score * 2, score == 11 )
  22. >> 11 22 True
  23. # Iterates over the results
  24. for result in score:
  25. print(result)
  26. >> 5
  27. >> 6
  28. # Parse patterns with **roll()**
  29. ps = roll("2d6+18")
  30. print( ps, ps.format() )
  31. >> 28 '[5,6]+18'
  32. #### CLI
  33. Run `python roll.py [options] <expr>`
  34. Usage:
  35. roll [options] <expr>
  36. Options:
  37. -s Numeric score only
  38. -h --help Displays help message
  39. --version Displays current xdice version
  40. #### CONTRIBUTION
  41. Any opinion / contribution is welcome, please contact us.
  42. #### TO INSTALL
  43. pip install xdice
  44. #### License
  45. *xdice* is under GNU License
  46. #### Author
  47. Olivier Massot, 2017, with *Cro-ki Lab*
  48. #### Tags
  49. dice roll d20 game random parser dices role board
  50. Keywords: xdice roll d20 game random parser dices role board
  51. Platform: UNKNOWN
  52. Classifier: Development Status :: 5 - Production/Stable
  53. Classifier: Intended Audience :: Developers
  54. Classifier: Intended Audience :: Other Audience
  55. Classifier: Topic :: Games/Entertainment :: Board Games
  56. Classifier: Topic :: Games/Entertainment :: Role-Playing
  57. Classifier: Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)
  58. Classifier: Topic :: Games/Entertainment :: Turn Based Strategy
  59. Classifier: License :: OSI Approved :: GNU General Public License (GPL)
  60. Classifier: Programming Language :: Python :: 3.3
  61. Classifier: Programming Language :: Python :: 3.4
  62. Classifier: Programming Language :: Python :: 3.5
  63. Classifier: Programming Language :: Python :: 3.6
  64. Requires-Python: >=3.3