If you are using Python Shopify API
and getting following error
"Exceeded 4 calls per second for api client. Reduce request rates to resume uninterrupted service."
but want your script to continue working with some timeout after that,
you can use following script from shopify_limits_patch.py
.
For that just copy shopify_limits_patch.py
to your project and import shopify_limits_patch
.
Or if you want to call it implicitly import it, remove last line patch_shopify_with_limits()
and call it before all your shopify calls.
This is solution for issue described here: Shopify/shopify_python_api#256
If you have any suggestions for code - leave comment :)
@b4p3p yeah, this way of import also works. Probably even better than proposed in 2018 😅
Can't check if
'retry-after'
should be lower cased or any other. But people that use it - can easily do that.