Coverage for docs_src / commands / callback / tutorial004_py39.py: 100%
7 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-02-09 12:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-02-09 12:36 +0000
1import typer 1abcdefgh
3app = typer.Typer() 1abcdefgh
6@app.callback() 1abcdefgh
7def callback(): 1abcdefgh
8 """
9 Manage users CLI app.
11 Use it with the create command.
13 A new user with the given NAME will be created.
14 """
17@app.command() 1abcdefgh
18def create(name: str): 1abcdefgh
19 print(f"Creating user: {name}") 1abcdefgh
22if __name__ == "__main__": 1abcdefgh
23 app() 1abcdefgh