Coverage for docs_src / commands / context / tutorial002_py39.py: 100%
11 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.command() 1abcdefgh
7def create(username: str): 1abcdefgh
8 print(f"Creating user: {username}") 1abcdefgh
11@app.command() 1abcdefgh
12def delete(username: str): 1abcdefgh
13 print(f"Deleting user: {username}") 1abcdefgh
16@app.callback(invoke_without_command=True) 1abcdefgh
17def main(): 1abcdefgh
18 """
19 Manage users in the awesome CLI app.
20 """
21 print("Initializing database") 1abcdefgh
24if __name__ == "__main__": 1abcdefgh
25 app() 1abcdefgh