Skip to content

Commit 6e051d8

Browse files
committed
docs: clarify usage of option with multiple values
1 parent 9342f8c commit 6e051d8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs_src/multiple_values/options_with_multiple_values/tutorial001_py39.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
"""
2+
This example shows how to define a Typer option that accepts multiple values
3+
using a tuple type hint.
4+
5+
The --user option expects exactly three values, in this order:
6+
1. username (str)
7+
2. coins (int)
8+
3. is_wizard (bool)
9+
10+
Example usage:
11+
python tutorial001_py39.py --user Harry 100 true
12+
"""
113
import typer
214

315
app = typer.Typer()

0 commit comments

Comments
 (0)