Coverage for docs_src/subcommands/name_help/tutorial001.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-09 18:26 +0000

1import typer 1abcdefgh

2 

3app = typer.Typer() 1abcdefgh

4 

5users_app = typer.Typer() 1abcdefgh

6app.add_typer(users_app, name="users", help="Manage users in the app.") 1abcdefgh

7 

8 

9@users_app.command() 1abcdefgh

10def create(name: str): 1abcdefgh

11 print(f"Creating user: {name}") 1abcdefgh

12 

13 

14if __name__ == "__main__": 1abcdefgh

15 app() 1abcdefgh