parameters.md
This file
Path
docs/reference/parameters.md
31 lines · 703 bytes · Markdown
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than e02a709 point at it.
📝 Update release notesgithub-actions[bot]before adoptione02a709
lines 1–31why, one step back1# Parameters23Parameters to our command line interface may be both [CLI Options](https://typer.tiangolo.com/tutorial/options/) and [CLI Arguments](https://typer.tiangolo.com/tutorial/arguments/):45```python6from typing import Annotated7import typer89app = typer.Typer()1011@app.command()12def register(13 user: Annotated[str, typer.Argument()],14 age: Annotated[int, typer.Option(min=18)],15 score: Annotated[float, typer.Option(max=100)] = 0,16):17 print(f"User is {user}")18 print(f"--age is {age}")19 print(f"--score is {score}")2021if __name__ == "__main__":22 app()23```2425::: typer.Argument26 options:27 show_overloads: false2829::: typer.Option30 options:31 show_overloads: false