Skip to main content

A neat generic dice API.

Project description


Angda (A Neat Generic Dice API) is a dice-rolling API created in Python by Stephen Malone.


  1. Install Python 3.7 or higher.
  2. Run pip install angda.


Angda can be used on the command-line or imported as a Python library.


Run angda --help to see all available options.

$ angda 2d6+1
#1: 2d6+1 = 7.

$ angda 2d6+1 --quiet

$ angda 2d6+1 --details
Dice #1:
- String: 2d6+1.
- Fields: Dice=2, Size=6, Plus=1.
- Result: [4, 2] + 1 = 7.

Python Library

Use angda.roll for simple rolls, or the Dice class for more complex cases.

>>> import angda

>>> angda.roll('2d6+1')

>>> angda.roll('2d6+1', objects=True)
{'dice': Dice(2, 6, 1), 'roll': Roll(7, 1, [4, 2])}

>>> dice = angda.Dice(dice=4, size=6, plus=0)
>>> dice.roll()
Roll(7, 1, [4, 2])


Angda uses the following third-party libraries:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for angda, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size angda-0.1.0-py3-none-any.whl (7.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size angda-0.1.0.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page