Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' with Python Shopify Module
<p>I am looking for a way to view the header information of my requests when calling the Shopify API.</p>

<p>The API documentation says: </p>

<blockquote>
  <p>You can check how many calls you've already made using the Shopify header that was sent in response to your API call:
  HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT (lists how many calls you've made for that particular shop)</p>
</blockquote>

<p>On a Shopify support page I found a thread asking this same question, and Shopify's response was:</p>

<blockquote>
  <p>If (you are using) the python adapter then you probably need to use the get_headers method. I'm not sure, I don't use this library.</p>
</blockquote>

<p>When exploring I have tried calls like the following:</p>

<pre><code>shopify.ShopifyResource.get_headers().get('HTTP_X_SHOPIFY_API_CALL_LIMIT')
&gt;&gt;None
</code></pre>

<p>Was able to access it via:</p>

<p><code>resp_header = shopify.ShopifyResource.connection.response.headers.['x-shopify-shop-api-call-limit']</code></p>

<p>However, I also saw on another thread that there is also an API Key Global limit that should be accessible somewhere through: <code>'x-shopify-api-call-limit'</code></p>

python shopify