Coverage for docs_src/subcommands/name_help/tutorial002.py: 100%
9 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
1import typer 1habcdefg
3app = typer.Typer() 1habcdefg
5users_app = typer.Typer() 1habcdefg
6app.add_typer(users_app) 1habcdefg
9@users_app.callback() 1habcdefg
10def users(): 1abcdefg
11 """
12 Manage users in the app.
13 """
16@users_app.command() 1habcdefg
17def create(name: str): 1habcdefg
18 print(f"Creating user: {name}") 1habcdefg
21if __name__ == "__main__": 1habcdefg
22 app() 1habcdefg