Coverage for docs_src / commands / help / tutorial002.py: 100%
8 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
1import typer 1abcdefghij
3app = typer.Typer() 1abcdefghij
6@app.command(help="Create a new user with username.") 1abcdefghij
7def create(username: str): 1abcdefghij
8 """
9 Some internal utility function to create.
10 """
11 print(f"Creating user: {username}") 1abcdefghij
14@app.command(help="Delete a user with username.") 1abcdefghij
15def delete(username: str): 1abcdefghij
16 """
17 Some internal utility function to delete.
18 """
19 print(f"Deleting user: {username}") 1abcdefghij
22if __name__ == "__main__": 1abcdefghij
23 app() 1abcdefghij