File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
- <style >
2
- .md-content .md-typeset h1 { display : none ; }
3
- </style >
4
-
5
1
<p align =" center " >
6
2
<a href =" https://typer.tiangolo.com " ><img src =" https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg#only-light " alt =" Typer " ></a >
7
- <!-- only-mkdocs -->
8
- <a href =" https://typer.tiangolo.com " ><img src =" img/logo-margin/logo-margin-white-vector.svg#only-dark " alt =" Typer " ></a >
9
- <!-- /only-mkdocs -->
3
+
10
4
</p >
11
5
<p align =" center " >
12
6
<em>Typer, build great CLIs. Easy to code. Based on Python type hints.</em>
@@ -221,12 +215,6 @@ And that will:
221
215
* Add two subcommands with ` @app.command() ` .
222
216
* Execute the ` app() ` itself, as if it was a function (instead of ` typer.run ` ).
223
217
224
-
225
- > ** Note** :
226
- > If your app only has one command, the command name is ** omitted** in usage: ` python main.py Camila ` .
227
- > However, when there are multiple commands, you must ** explicitly include the command name** : ` python main.py hello Camila ` .
228
- > See [ One or Multiple Commands] ( https://typer.tiangolo.com/tutorial/commands/one-or-multiple/ ) for more details.
229
-
230
218
### Run the upgraded example
231
219
232
220
Check the new help:
@@ -330,6 +318,11 @@ Goodbye Ms. Camila. Have a good day.
330
318
331
319
</div >
332
320
321
+ > ** Note** :
322
+ > If your app only has one command, the command name is ** omitted** in usage: ` python main.py Camila ` .
323
+ > However, when there are multiple commands, you must ** explicitly include the command name** : ` python main.py hello Camila ` .
324
+ > See [ One or Multiple Commands] ( https://typer.tiangolo.com/tutorial/commands/one-or-multiple/ ) for more details.
325
+
333
326
### Recap
334
327
335
328
In summary, you declare ** once** the types of parameters (* CLI arguments* and * CLI options* ) as function parameters.
You can’t perform that action at this time.
0 commit comments