resend
Advanced tools
+1
-1
| Metadata-Version: 2.1 | ||
| Name: resend | ||
| Version: 2.19.0 | ||
| Version: 2.21.0 | ||
| Summary: Resend Python SDK | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/resendlabs/resend-python |
| Metadata-Version: 2.1 | ||
| Name: resend | ||
| Version: 2.19.0 | ||
| Version: 2.21.0 | ||
| Summary: Resend Python SDK | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/resendlabs/resend-python |
@@ -42,2 +42,4 @@ from typing import Any, Dict, List, Optional, Union, cast | ||
| name (NotRequired[str]): The friendly name of the broadcast. Only used for internal reference. | ||
| send (NotRequired[bool]): When true, the broadcast will be sent immediately after creation. | ||
| scheduled_at (NotRequired[str]): Schedule the broadcast to be sent later. Only valid when send is true. | ||
| """ | ||
@@ -76,2 +78,13 @@ | ||
| """ | ||
| send: NotRequired[bool] | ||
| """ | ||
| When set to true, the broadcast will be sent immediately after creation. | ||
| If false or not provided, the broadcast will be created as a draft. | ||
| """ | ||
| scheduled_at: NotRequired[str] | ||
| """ | ||
| Schedule the broadcast to be sent later. | ||
| Only valid when send is set to true. | ||
| The date should be in natural language (e.g.: in 1 min) or ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z). | ||
| """ | ||
@@ -78,0 +91,0 @@ class UpdateParams(_UpdateParamsFrom): |
@@ -115,3 +115,3 @@ from typing import Any, Dict, List, Optional, Union, cast | ||
| List all topics for a contact. | ||
| see more: https://resend.com/docs/api-reference/contacts/list-contact-topics | ||
| see more: https://resend.com/docs/api-reference/contacts/get-contact-topics | ||
@@ -118,0 +118,0 @@ Args: |
+28
-0
@@ -163,2 +163,23 @@ """Resend Exceptions module. | ||
| class RateLimitError(ResendError): | ||
| """see https://resend.com/docs/api-reference/errors""" | ||
| def __init__( | ||
| self, | ||
| message: str, | ||
| error_type: str, | ||
| code: Union[str, int], | ||
| ): | ||
| suggested_action = """Reduce your request rate or wait before retrying. """ | ||
| suggested_action += """Check the response headers for rate limit information.""" | ||
| ResendError.__init__( | ||
| self, | ||
| code=code or "429", | ||
| message=message, | ||
| suggested_action=suggested_action, | ||
| error_type=error_type, | ||
| ) | ||
| # Dict with error code -> error type mapping | ||
@@ -173,2 +194,7 @@ ERRORS: Dict[str, Dict[str, Any]] = { | ||
| "403": {"invalid_api_key": InvalidApiKeyError}, | ||
| "429": { | ||
| "rate_limit_exceeded": RateLimitError, | ||
| "daily_quota_exceeded": RateLimitError, | ||
| "monthly_quota_exceeded": RateLimitError, | ||
| }, | ||
| "500": {"application_error": ApplicationError}, | ||
@@ -199,2 +225,4 @@ } | ||
| or | ||
| RateLimitError: If the error type is rate_limit_exceeded, daily_quota_exceeded, or monthly_quota_exceeded | ||
| or | ||
| ApplicationError: If the error type is application_error | ||
@@ -201,0 +229,0 @@ or |
@@ -1,2 +0,2 @@ | ||
| __version__ = "2.19.0" | ||
| __version__ = "2.21.0" | ||
@@ -3,0 +3,0 @@ |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
176422
0.91%4620
0.81%