python-easyverein 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/PKG-INFO +1 -1
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/__init__.py +1 -1
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/core/client.py +11 -1
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/core/exceptions.py +6 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/pyproject.toml +1 -1
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/LICENSE +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/README.md +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/api.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/core/__init__.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/core/protocol.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/core/types.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/core/validators.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/__init__.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/base.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/contact_details.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/custom_field.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/invoice.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/invoice_item.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/member.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/member_custom_field.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/mixins/__init__.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/mixins/empty_strings_mixin.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/mixins/required_attributes.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/__init__.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/contact_details.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/custom_field.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/invoice.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/invoice_item.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/member.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/member_custom_field.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/mixins/__init__.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/mixins/crud.py +0 -0
- {python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/mixins/recycle_bin.py +0 -0
|
@@ -103,13 +103,23 @@ class EasyvereinClient:
|
|
|
103
103
|
|
|
104
104
|
if res.status_code == 429:
|
|
105
105
|
retry_after = res.headers["Retry-After"]
|
|
106
|
+
|
|
107
|
+
try:
|
|
108
|
+
retry_after = int(retry_after)
|
|
109
|
+
except ValueError:
|
|
110
|
+
self.logger.error(
|
|
111
|
+
"Unable to parse Retry-After header while handling 429 response code."
|
|
112
|
+
)
|
|
113
|
+
self.logger.debug("Retry-After header: %s", retry_after)
|
|
114
|
+
retry_after = 0
|
|
115
|
+
|
|
106
116
|
self.logger.warning(
|
|
107
117
|
"Request returned status code 429, too many requests. Wait %d seconds",
|
|
108
118
|
retry_after,
|
|
109
119
|
)
|
|
110
120
|
raise EasyvereinAPITooManyRetriesException(
|
|
111
|
-
retry_after,
|
|
112
121
|
f"Too many requests, please wait {retry_after} seconds and try again.",
|
|
122
|
+
retry_after=retry_after,
|
|
113
123
|
)
|
|
114
124
|
|
|
115
125
|
if res.status_code == 404:
|
|
@@ -21,4 +21,10 @@ class EasyvereinAPITooManyRetriesException(EasyvereinAPIException):
|
|
|
21
21
|
Exception if the API returns a 429 Too Many Requests error
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
+
def __init__(self, message, retry_after: int = 0):
|
|
25
|
+
# Call the base class constructor with the parameters it needs
|
|
26
|
+
super().__init__(message)
|
|
27
|
+
|
|
28
|
+
self.retry_after = retry_after
|
|
29
|
+
|
|
24
30
|
retry_after = 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/member_custom_field.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/mixins/empty_strings_mixin.py
RENAMED
|
File without changes
|
{python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/models/mixins/required_attributes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/member_custom_field.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_easyverein-0.2.0 → python_easyverein-0.2.1}/easyverein/modules/mixins/recycle_bin.py
RENAMED
|
File without changes
|