I have been trying to write this tutorial for a long time and now it is here. I have tried to omit extra basics to argparse .This tutorial focus on creating subcommands. like a git add
To learn basics of argparse ,please go to python official documentation.
Basicsarguments can be passed to scripts command line or can be provided as list in parse_args() |
Optional Arguments |
SubcommandsTo make things easy , think a command like a tree having levels and branches.Let's try to see the help of our new subcommandLet's try using our new subcommand |
Thank you everyone for going through this tutorial. I hope this helps you as it helped me.