Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' With Python Shopify Module
I am looking for a way to view the header information of my requests when calling the Shopify API.
The API documentation says:
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)
On a Shopify support page I found a thread asking this same question, and Shopify's response was:
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.
When exploring I have tried calls like the following:
Was able to access it via:
resp_header = shopify.ShopifyResource.connection.response.headers["X-Shopify-Shop-Api-Call-Limit"]
However, I also saw on another thread that there is also an API Key Global limit that should be accessible somewhere through:
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Django, code inside <script> tag doesn't work in a template
- → React - Django webpack config with dynamic 'output'
- → GAE Python app - Does URL matter for SEO?
- → Put a Rendered Django Template in Json along with some other items
- → session disappears when request is sent from fetch
- → Python Shopify API output formatted datetime string in django template
- → Shopify app: adding a new shipping address via webhook
- → Shopify + Python library: how to create new shipping address
- → shopify python api: how do add new assets to published theme?
- → Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' with Python Shopify Module