title: How to pass OData Query Options using requests library in Python?
body: <p>Working with an <a href="https://help.restaurant365.net/support/solutions/articles/12000042523-restaurant365-odata-connector" rel="nofollow noreferrer">OData API</a> using Python and Requests library.</p>
  <p>Can you pass <a href="http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_QueryingCollections" rel="nofollow noreferrer">System Query Options</a> outside of the URL syntax?</p>
  <pre><code>URL = &quot;https://odata.restaurant365.net/api/v2/views/Transaction?&quot;\
      &quot;$filter=locationId eq xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&quot;\
      &quot; and date eq 2022-01-16T00:00:00Z&quot;\
      &quot; and type eq 'Journal Entry'&quot;
  
  response = requests.get(URL, auth=(USER_NAME, PASS_WORD))
  </code></pre>
  <p>How do you pass the Query Option <code>$filter</code> in this case:</p>
  <pre><code>URL = &quot;https://odata.restaurant365.net/api/v2/views/Transaction?&quot;
  DATA = {&quot;locationId&quot; : &quot;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&quot;,
      &quot;date&quot; : &quot;2022-01-16T00:00:00Z&quot;,
      &quot;type&quot; : &quot;'Journal Entry'&quot;,
     }
  response = requests.get(URL, auth=(USER_NAME, PASS_WORD), params=DATA)
  </code></pre>