required是设置必选非必选,nullable允不允许向传null,location指定参数获取的位置,可以多选,按前后顺序获取 parser.add_argument('app_id', type=zero_int, required=True, nullable=False, location=['json']) parser.add_argument('user_num', type=empty_str, required=True, nullable=False, location=