First Check
Commit to Help
Example Code
@app.command(
name="foo",
help="bar",
)
def command1(path: str) -> None: # noqa: D401
"""
Text
Args:
path: my favourite path
"""
# some code here
Description
I am new to Typer but I cannot really find the info I need in the docs nor Google/SO...
I am trying to add flags to my app with typer commands. I would like to have:
myApp command1 --flag1 value1 --flag2 value2
Is it possible to modify the code I posted above so that the commands accepts additional named parameters?
Operating System
Linux
Operating System Details
Ubuntu 20.04
Typer Version
0.4.1
Python Version
Python 3.9.13
Additional Context
I asked the same question on StackOverflow but did not get any response yet:
https://stackoverflow.com/questions/73780139/how-to-add-flags-for-typer-commands-in-python
First Check
Commit to Help
Example Code
Description
I am new to Typer but I cannot really find the info I need in the docs nor Google/SO...
I am trying to add flags to my app with typer commands. I would like to have:
Is it possible to modify the code I posted above so that the commands accepts additional named parameters?
Operating System
Linux
Operating System Details
Ubuntu 20.04
Typer Version
0.4.1
Python Version
Python 3.9.13
Additional Context
I asked the same question on StackOverflow but did not get any response yet:
https://stackoverflow.com/questions/73780139/how-to-add-flags-for-typer-commands-in-python