Role-Playing Game Toolkit is a platform for build Python RPG's systems.
Install and update using pip:
$ pip install -U rpgtk
# dice.py
from rpgtk import Dice
dice = Dice(sides=20)
dice.roll()
print(dice)
python dice.py
'D20[6]'
# advantage roll
from rpgtk import Dice
dice = Dice(sides=20)
advantage_roll = max(dice * 2)
print(advantage_roll)