title: flask optional argument in request.args
body: <p>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.</p>
  
  <pre><code>if 'A' in request.args:
      A = request.args['A']
  else:
      A = 0
  </code></pre>
  
  <p>but I feel like that there must be something precise. This seems a bit unprofessional. Something like when I work argparse</p>
  
  <pre><code>parser.add_argument('--A', type=int, required=False')
  </code></pre>
  
  <p>Please, is it possible to shorten the first section a bit and use some of their functions for it? Thanks</p>