Skip to content

IDEV-2546 Python wrapper used in any integration may cause a rate limit issue due to account rate limit checking - #200

Merged
wesleya merged 2 commits into
mainfrom
idev-2456-ignore-account-info-rate-limit
Jul 13, 2026
Merged

IDEV-2546 Python wrapper used in any integration may cause a rate limit issue due to account rate limit checking#200
wesleya merged 2 commits into
mainfrom
idev-2456-ignore-account-info-rate-limit

Conversation

@wesleya

@wesleyawesleya commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Update python wrapper with a patch that allows the wrapper to proceed with Iris Enrich call even if account_information returns a 503 error only (rate limit error).

See test results below, main branch will fail on account_info 503. But switching to idev-2456-ignore-account-info-rate-limit allows the test script to proceed with enrich call.

(venv) ➜ python_api git:(main) ✗ python3 westest-ignore-account-limit.py
Traceback (most recent call last):
File "/Users/wagena/Documents/Projects/python_api/westest-ignore-account-limit.py", line 3, in <module>
result = dt_api.iris_enrich('Amazon-Help-Desk.com')
File "/Users/wagena/Documents/Projects/python_api/domaintools/api.py", line 634, in iris_enrich
results = self._results(
File "/Users/wagena/Documents/Projects/python_api/domaintools/api.py", line 166, in _results
self._rate_limit(product)
File "/Users/wagena/Documents/Projects/python_api/domaintools/api.py", line 151, in _rate_limit
for product in self.account_information():
File "/Users/wagena/Documents/Projects/python_api/domaintools/base_results.py", line 272, in __iter__
return self._items().__iter__()
File "/Users/wagena/Documents/Projects/python_api/domaintools/base_results.py", line 255, in _items
response = self.response()
File "/Users/wagena/Documents/Projects/python_api/domaintools/base_results.py", line 236, in response
response = self.data()
File "/Users/wagena/Documents/Projects/python_api/domaintools/base_results.py", line 163, in data
self.setStatus(results.status_code, results)
File "/Users/wagena/Documents/Projects/python_api/domaintools/base_results.py", line 226, in setStatus
raise ServiceUnavailableException(code, reason)
domaintools.exceptions.ServiceUnavailableException: {'error': {'code': 503, 'message': 'You have exceeded the maximum number of requests per month allowed under your service level. (1/month)'}, 'resources': {'support': 'https://docs.domaintools.com'}}
(venv) ➜ python_api git:(main) ✗ git checkout idev-2456-ignore-account-info-rate-limit
Switched to branch 'idev-2456-ignore-account-info-rate-limit'
Your branch is up to date with 'origin/idev-2456-ignore-account-info-rate-limit'.
(venv) ➜ python_api git:(idev-2456-ignore-account-info-rate-limit) ✗ python3 westest-ignore-account-limit.py
{
"response": {
"limit_exceeded": false,
"message": "Enjoy your data.",
"results_count": 1,
"results": [
{
"domain": "amazon-help-desk.com",
...
}
],
"missing_domains": []
}
}
(venv) ➜ python_api git:(idev-2456-ignore-account-info-rate-limit) ✗ 

@wesleyawesleya changed the title Draft: first pass at ignoring account info rate limit when making api queriesIDEV-2546 Python wrapper used in any integration may cause a rate limit issue due to account rate limit checkingJul 8, 2026
@wesleya
wesleya merged commit 50bf4e1 into mainJul 13, 2026
23 of 24 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@wesleya