DMing
DMing is a CLI (command-line interface) collection useful when running a TTRPG (tabletop role-playing game).
DMing(Dungeon Mastering): Performing as a dungeon master, or running a tabletop role-playing game, especially Dungeons & Dragons.
Installation
pipx install dming
Usage
DMing provides a grouped command for all tools. The standalone roll command
remains available as a shortcut for dming roll.
Roll Dice
Use the command roll <dice>.
Examples:
roll 1d20: roll a d20 dieroll 1d100: roll a d100 dieroll 2d20kh1: roll with advantageroll 2d20kl1: roll with disadvantageroll 2d20dl1: roll with advantageroll 2d20dh1: roll with disadvantageroll 1d20+4: roll a d20 die with a +4 modifierroll 1d20-4: roll a d20 die with a -4 modifier
Add -d or --details to show every die, which dice were selected by a keep or
drop filter, and the complete arithmetic formula. Use --plain for output
without styling or emojis.
$ roll --details 2d20kh1
🎲 2d20kh1
├─ 2d20kh1: 19, 9 → 19 (keep highest 1)
├─ Math: 19
└─ Result: 19
$ roll --details 2d20
🎲 2d20
├─ 2d20: 4, 4
├─ Math: 4 + 4
└─ Result: 8
$ roll --details --plain 2d20
Roll: 2d20
2d20: 4, 4
Math: 4 + 4
Result: 8
Chance Tables
Use dming chance <die> to show the chance of meeting or exceeding each target
with a standard roll, advantage, or disadvantage. Tables support one die with
an optional modifier. The Roll Needed column shows the lowest natural roll
that reaches each target.
$ dming chance d20
$ dming chance d20+5
$ dming chance d20-3 --min-target 5 --max-target 30
The default range starts at target 1 and ends at the greater of the die size or
the highest modified total. Override either boundary with --min-target and
--max-target. Percentages use ordinary threshold rules; natural minimum and
maximum rolls do not introduce automatic failure or success rules.
Unit Conversions
Use dming convert to show Rich reference tables that convert common US
customary measurements to metric units.
$ dming convert distance
$ dming convert weight
Distance prints separate tables for inches, feet, and miles. The Squares
column expresses each distance as a number of 5-foot grid spaces. Weight shows
pounds converted to kilograms. Measurement units appear in the table headers,
such as (ft.), (m.), (lb.), and (kg.).
Supply repeatable unit options to build a table from custom values. When any custom values are supplied, only the requested unit tables are shown.
$ dming convert distance --foot 5 --foot 30
$ dming convert distance --inch 6 --mile 1
$ dming convert weight --pound 2.5 --pound 10
2024 Rules References
Use dming rules for fixed Rich tables from the official 2024 D&D rules.
$ dming rules abilities
$ dming rules carrying
$ dming rules difficulty
$ dming rules proficiency
$ dming rules sizes
Each table is based on an official 2024 rule:
- Ability Modifiers
- Typical Difficulty Classes
- Proficiency Bonus by Level or Challenge Rating
- Creature Size and Space
- Carrying Capacity
Creature sizes also include metric dimensions. Carrying-capacity entries also include kilogram equivalents for carrying and for dragging, lifting, or pushing.
Using the Library
from dming.dice import roll
operation, result = roll("1d20+2")
Alternatives
- JavaScript: Dice Roller & Parser.
Development
For development instructions, see the DMing development guide.
Releases
GitHub Releases are the canonical release history. See DMing releases for release notes and downloadable artifacts.
Metadata
Release files for dming 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dming-0.2.0.tar.gz | 51.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dming-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.6 kB
Release files / dming-0.2.0.tar.gz
| Download URL | dming-0.2.0.tar.gz |
|---|---|
| Size | 51.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a93a34a862fe3581b1342e0c2434b3b76b3e7c378d0e50567243369a2c4245e8
|
|
BLAKE2b-256 checksum How to use checksums |
244bae24fa4db4c40985159b5dfe0e2c6500e29c2e4573607abb0043b3f5086f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / dming-0.2.0-py3-none-any.whl
| Download URL | dming-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db55a25b36d565a8a5690dbf2552ac81d31a125f9a2f6e9b278f52393c0ed42b
|
|
BLAKE2b-256 checksum How to use checksums |
0fc5d3fef78f9b76b67d27196e3d6d908d4dd89cf63868afa3d1149aa4cb0d71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency log