sendly-python 1.2.0__py3-none-any.whl → 1.3.0__py3-none-any.whl

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.
sendly/client.py CHANGED
@@ -64,7 +64,7 @@ if TYPE_CHECKING:
64
64
  __all__ = ["DEFAULT_BASE_URL", "SDK_VERSION", "Sendly"]
65
65
 
66
66
  #: Package version. Kept in sync with ``pyproject.toml``.
67
- SDK_VERSION = "1.2.0"
67
+ SDK_VERSION = "1.3.0"
68
68
 
69
69
  #: Default production API base. Override via ``base_url`` for staging/self-hosted.
70
70
  DEFAULT_BASE_URL = "https://api.sendly.now"
sendly/types.py CHANGED
@@ -39,12 +39,16 @@ Pagination = JSONDict
39
39
  SendEmailData = JSONDict
40
40
  SendEmailResponse = JSONDict
41
41
  BatchSendResponse = JSONDict
42
+ #: An email row. Beyond the delivery fields it carries, ``str | None`` and ``None``
43
+ #: until the event happens, ``bounceType``, ``bounceSubType``, ``bounceStatusCode``,
44
+ #: ``bounceDiagnosticCode`` and ``complaintFeedbackType``.
42
45
  EmailRecord = JSONDict
43
46
  EmailListResponse = JSONDict
44
47
 
45
48
  #: One transition in a message's delivery history -- the append-only record
46
49
  #: behind ``status``. ``status`` says where the message is now; these say how it
47
- #: got there.
50
+ #: got there. A bounce transition also carries ``bounceType``, ``bounceSubType``,
51
+ #: ``bounceStatusCode`` and ``bounceDiagnosticCode`` (each ``str | None``).
48
52
  EmailEvent = JSONDict
49
53
  #: An email together with its delivery history, oldest first.
50
54
  EmailWithEvents = JSONDict
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sendly-python
3
- Version: 1.2.0
3
+ Version: 1.3.0
4
4
  Summary: Official Python SDK for Sendly (sendly.now), the email API and platform for developers by Devino Solutions: transactional email, contacts, templates and webhooks.
5
5
  Project-URL: Homepage, https://sendly.now
6
6
  Project-URL: Documentation, https://docs.sendly.now
@@ -311,6 +311,26 @@ for event in email["events"]:
311
311
  somebody opened, read `openedAt` / `opens` on the rows — engagement is not a
312
312
  status.
313
313
 
314
+ A bounced or complained message says why. Each key below is `str | None` and is
315
+ `None` until the event happens (or when the receiving server did not say):
316
+
317
+ ```python
318
+ email = sendly.emails.get("em_123")["data"]
319
+ if email["status"] == "BOUNCED":
320
+ # `bounceType` is "Permanent" or "Undetermined" here (a "Transient" bounce is
321
+ # retried and never sets BOUNCED); the rest are the receiving server's own words.
322
+ # Show them to a person, do not parse them.
323
+ print(email["bounceType"], email["bounceSubType"],
324
+ email["bounceStatusCode"], email["bounceDiagnosticCode"])
325
+ if email["complainedAt"] is not None:
326
+ print(email["complaintFeedbackType"]) # e.g. "abuse"
327
+ ```
328
+
329
+ Each entry of `email["events"]` carries the same four `bounce*` keys for the
330
+ transition that recorded them. The `email.bounced` webhook body adds
331
+ `bounceSubType`, `bounceStatusCode` and `bounceDiagnosticCode`, and
332
+ `email.complained` adds `complaintFeedbackType`.
333
+
314
334
  ### Contacts
315
335
 
316
336
  ```python
@@ -1,8 +1,8 @@
1
1
  sendly/__init__.py,sha256=KNGjrzKPY88Qo8J4LCWxa4Ae0Dwk1JIREQ9IFF2R8bY,3143
2
- sendly/client.py,sha256=a_2zC-EdBlvAyOk01iBIwG0jSzQwxwM9fJL2dlHLPXA,13536
2
+ sendly/client.py,sha256=TqB84R4C3pXBinW3kg3WozKNucIGVS9t1xotgrdav9Q,13536
3
3
  sendly/errors.py,sha256=urF33X-d39OEiasLh6C7PlrrUmmrS3XIMvFYj20rUy8,7002
4
4
  sendly/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- sendly/types.py,sha256=bFEjl4twmwtCUdw5zO5QF8C3d3dn1s63cghJCrMzkXM,7625
5
+ sendly/types.py,sha256=2cbZqteyutTuIxllK9Sq79_D6XjObzRSHRenRuCZ3hw,7997
6
6
  sendly/webhook_utils.py,sha256=epmK860gLknaElxfXdVD3h_9ASkjWQsyl1exUC8qBL4,4762
7
7
  sendly/resources/__init__.py,sha256=Nf7zjcFjsztXsGtrvxq3KGacX7SwDgSf3r0nAVHLvPY,73
8
8
  sendly/resources/_helpers.py,sha256=W6AlzXuqH53Vk1dIxuQm_-Vpq9gmZvLzKPRionjH9wQ,550
@@ -27,7 +27,7 @@ sendly/resources/validation.py,sha256=sS0gAs5Kph-QK73YZ7dkZCUP2ZPiDtyO1DLlQuZAle
27
27
  sendly/resources/verify.py,sha256=QyVNmrzZ4Nj87YWxMPt9wlovcCyZutV9eGmn49c0EEg,818
28
28
  sendly/resources/webhooks.py,sha256=w0ZwueAGKTP6Du3b6jMr24C9nv_a_vnDExYYy3N1pfA,8036
29
29
  sendly/resources/workflows.py,sha256=wZUpL57lrKmgcdjNaLS89lyEG2D1Ov2EKfXSlcQFn74,9768
30
- sendly_python-1.2.0.dist-info/METADATA,sha256=ZrtlQzGFqwMHFh0H9j8pUeZyA8P9zLs5rE839FedC_M,59817
31
- sendly_python-1.2.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
32
- sendly_python-1.2.0.dist-info/licenses/LICENSE,sha256=TZHT_f_vV-xujWjSy7EkTybNT6iivrfGHLd-rR1Xl7c,1073
33
- sendly_python-1.2.0.dist-info/RECORD,,
30
+ sendly_python-1.3.0.dist-info/METADATA,sha256=lgummrFC5rHDlamNCa0jscQR9JokeLdnNifo9tQj4lg,60764
31
+ sendly_python-1.3.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
32
+ sendly_python-1.3.0.dist-info/licenses/LICENSE,sha256=TZHT_f_vV-xujWjSy7EkTybNT6iivrfGHLd-rR1Xl7c,1073
33
+ sendly_python-1.3.0.dist-info/RECORD,,