def setup_argparse():
    'Create argument parser.'
    parser = argparse.ArgumentParser(prog='varfish-cli')
    parser.add_argument('--verbose', action='store_true', default=False, help='Increase verbosity.')
    parser.add_argument('--version', action='version', version=('%%(prog)s %s' % __version__))
    group = parser.add_argument_group('Basic Configuration')
    group.add_argument('--no-verify-ssl', dest='verify_ssl', default=True, action='store_false', help='Disable HTTPS SSL verification')
    group.add_argument('--config', default=os.environ.get('VARFISH_CONFIG_PATH', None), help='Path to configuration file.')
    group.add_argument('--varfish-server-url', default=os.environ.get('VARFISH_SERVER_URL', None), help='VarFish server URL key to use, defaults to env VARFISH_SERVER_URL.')
    group.add_argument('--varfish-api-token', default=os.environ.get('VARFISH_API_TOKEN', None), help='VarFish API token to use, defaults to env VARFISH_API_TOKEN.')
    subparsers = parser.add_subparsers(dest='cmd')
    setup_argparse_case(subparsers.add_parser('case', help='Work with cases.'))
    return (parser, subparsers)
Create argument parser.
def setup_argparse():
    
    parser = argparse.ArgumentParser(prog='varfish-cli')
    parser.add_argument('--verbose', action='store_true', default=False, help='Increase verbosity.')
    parser.add_argument('--version', action='version', version=('%%(prog)s %s' % __version__))
    group = parser.add_argument_group('Basic Configuration')
    group.add_argument('--no-verify-ssl', dest='verify_ssl', default=True, action='store_false', help='Disable HTTPS SSL verification')
    group.add_argument('--config', default=os.environ.get('VARFISH_CONFIG_PATH', None), help='Path to configuration file.')
    group.add_argument('--varfish-server-url', default=os.environ.get('VARFISH_SERVER_URL', None), help='VarFish server URL key to use, defaults to env VARFISH_SERVER_URL.')
    group.add_argument('--varfish-api-token', default=os.environ.get('VARFISH_API_TOKEN', None), help='VarFish API token to use, defaults to env VARFISH_API_TOKEN.')
    subparsers = parser.add_subparsers(dest='cmd')
    setup_argparse_case(subparsers.add_parser('case', help='Work with cases.'))
    return (parser, subparsers)