title: Pass (optional) parameters to HTTP parameter (Python, requests)
body: <p>I am currently working on an API Wrapper, and I have an issue with passing the parameters from a function, into the payload of requests. The parameters can be blockId, senderId, recipientId, limit, offset, orderBy. All parameters join by "OR". One possible solution could be having if statements for every combination, but I imagine that that is a terrible way to do it. (requests and constants are already imported)</p>
  
  <pre><code>def transactionsList(*args **kwargs):
      if blockId not None:
          payload = {'blockId': blockId}
      if offset not None:
          payload = {'offset': offset}
      ...
      r = requests.get(constants.TRANSACTIONS_LIST, params=payload, timeout=constants.TIMEOUT)
      return r
  </code></pre>
  
  <p>What is (or are) more elegant ways to achieve parameters of the function getting passed to the requests payload? </p>