I am building a small API. For now I am having this workaround solution for optional arguments that need to be send to function later.
if 'A' in request.args:
A = request.args['A']
else:
A = 0
but I feel like that there must be something precise. This seems a bit unprofessional. Something like when I work argparse
parser.add_argument('--A', type=int, required=False')
Please, is it possible to shorten the first section a bit and use some of their functions for it? Thanks