Welcome to yadr’s documentation!

Introduction to yadr

The yadr package is a Yet Another Dice Notation (YADN) parser that can be used to generate random numbers in a way that simulates rolling dice for a game.

The name yadr stands for “Yet Another Dice Roller,” a reference to the fact there is no shortage of dice rollers in PyPI.

Using yadr

If you want to execute the package from the command line, you can install the package using pip or other Python package manager, and run it as a module with the following:

python -m yadr <YADN_string>

If you want to import it into your own code, install and import the package as usual. You can then use the yadr.roll() function to execute a string of YADN.:

>>> import yadr
>>>
>>> yadn = '3d6'
>>> result = yadr.roll(yadn)

Indices and tables