Just some nice
Dice
objects in Python. We mainly target Marimo for now.
uv pip install dicekit
There are many ways to construct a Dice
object, but a simple one is to specify the number of sides.
from dicekit import Dice
d6 = Dice.from_sides(6)
d8 = Dice.from_sides(8)
The nice thing about these objects is their representation in the notebook.
To learn more, we recommend checking out this Marimo notebook. It shows the implementation, but also the flexibility of the objects. You can also copy the notebook and play around with it straight from the browser.