Create multiple sub commands with [Click] Description I'd like to create the script that includes some options such as the awscli . We can create it easy to use the Click library. So, I write a sample code about creating sub-command with Click . Premise Python : >= 3.7 Click : >= 7.0 Code import click def main(): cmd() @click.group() def cmd(): """First layer sub-command group """ pass @cmd.group() def sub_command_1(): """Second layer sub-command group """ pass @cmd.group() def sub_command_2(): """Second layer sub-command group """ pass @sub_command_1.command() def sub_command_1_1(): print("Hello, subcommand 1 under the 1st layer subcommand 1") @sub_command_1.command() def sub_command_1_2(): print("Hello, sub...
I am writing to practice to increase my English skills. Basically, I'll write solutions to the issue of programming, SQL, and so on. ** The opinions expressed in this article are the author’s own and do not reflect the view of the company I belong to. **