We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c7e87c commit 558a6f2Copy full SHA for 558a6f2
1 file changed
docs/source/usage.rst
@@ -2,6 +2,17 @@
2
Usage
3
=====
4
5
-Describe here how to use the library with some general use examples.
+To use the parser just import it:
6
7
-Any detailed topic should go into it's own section.
+ >>> from dice_notation.parser import DiceParser
8
+
9
+And then parse a dice notation expression:
10
11
+ >>> parser = DiceParser()
12
+ >>> dice = parser.parse('1d6+2')
13
14
+The result can be accessed just by calling the 'roll' method as many times as
15
+needed, which will generate a new random value each time it is called.
16
17
+ >>> print(dice.roll())
18
0 commit comments