We are using the Python SDK.
How are people rate limiting their API requests? We frequently receive the "Too Many Requests" error.
The ratelimit project looks good - but doesn't seem to allow you to limit with a group. We are making API calls on behalf of several merchants, so it's not feasible to enforce limits application wide for all merchants.
A solution that uses an existing project or module would be preferable.
Hey @Travis_D ,
Here's a helpful article that provides some tips on how avoid the API Rate Limits: https://www.shopify.ca/partners/blog/84051654-7-tips-to-maximize-your-use-of-the-shopify-api
One of the useful tips is to schedule concurrent jobs to send out synchronized API requests to Shopify, and then use a data storage of some kind in order to track the remaining API budget between all of the jobs. In terms of existing projects or modules you can use, you can look into implementing a Python job scheduler (like schedule or APScheduler) and use some database like Redis to track your shared API budget count between jobs.
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution