resend
Advanced tools
| from typing import Any, Dict | ||
| class ResponseDict(Dict[str, Any]): | ||
| """Dict subclass that supports attribute-style access. | ||
| This allows SDK responses to be accessed using either dict syntax | ||
| (response['data']) or attribute syntax (response.data), providing | ||
| consistency with other Resend SDKs (e.g., Node.js). | ||
| """ | ||
| def __getattr__(self, name: str) -> Any: | ||
| try: | ||
| return self[name] | ||
| except KeyError: | ||
| raise AttributeError( | ||
| f"'{type(self).__name__}' object has no attribute '{name}'" | ||
| ) |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: resend | ||
| Version: 2.21.0 | ||
| Version: 2.22.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.21.0 | ||
| Version: 2.22.0 | ||
| Summary: Resend Python SDK | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/resendlabs/resend-python |
@@ -12,2 +12,3 @@ LICENSE.md | ||
| resend/request.py | ||
| resend/response.py | ||
| resend/version.py | ||
@@ -14,0 +15,0 @@ resend.egg-info/PKG-INFO |
@@ -9,2 +9,3 @@ import json | ||
| raise_for_code_and_type) | ||
| from resend.response import ResponseDict | ||
| from resend.version import get_version | ||
@@ -42,2 +43,4 @@ | ||
| if isinstance(data, dict): | ||
| data = ResponseDict(data) | ||
| return cast(T, data) | ||
@@ -44,0 +47,0 @@ |
@@ -1,2 +0,2 @@ | ||
| __version__ = "2.21.0" | ||
| __version__ = "2.22.0" | ||
@@ -3,0 +3,0 @@ |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
177124
0.4%65
1.56%4637
0.37%