Using Argparse and Json together
The args Namespace from parse_args can be transformed into a dictionary with: argparse_dict = vars(args) The JSON values are also in a dictionary, say json_dict. You can copy selected values from one dictionary to the other, or do a whole scale update: argparse_dict.update(json_dict) This way the json_dict values over write the argparse ones. If you … Read more