unitpost 0.1.0__tar.gz → 0.2.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitpost
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Official Unitpost SDK for Python — send email and manage contacts, segments, campaigns, templates, brand kits, domains, suppressions, webhooks, and usage.
5
5
  Project-URL: Homepage, https://www.unitpost.com
6
6
  Project-URL: Documentation, https://www.unitpost.com/docs
@@ -41,7 +41,7 @@ from unitpost import Unitpost
41
41
 
42
42
  unitpost = Unitpost() # reads UNITPOST_API_KEY (or pass Unitpost("up_..."))
43
43
 
44
- result = unitpost.emails.send({
44
+ result = unitpost.email.send({
45
45
  "from": "Acme <you@yourdomain.com>", # bare address works too
46
46
  "to": "customer@example.com",
47
47
  "subject": "Hello",
@@ -134,8 +134,8 @@ event = client.webhooks.verify(payload=raw_body, secret=secret, headers=request.
134
134
  Pass your own to dedupe across separate calls:
135
135
 
136
136
  ```python
137
- unitpost.emails.send({...}, idempotency_key="...")
138
- unitpost.emails.batch([...], idempotency_key="...")
137
+ unitpost.email.send({...}, idempotency_key="...")
138
+ unitpost.email.batch([...], idempotency_key="...")
139
139
  ```
140
140
 
141
141
  > The server dedupes on `(workspace, idempotency key)` for 24h and replays the
@@ -18,7 +18,7 @@ from unitpost import Unitpost
18
18
 
19
19
  unitpost = Unitpost() # reads UNITPOST_API_KEY (or pass Unitpost("up_..."))
20
20
 
21
- result = unitpost.emails.send({
21
+ result = unitpost.email.send({
22
22
  "from": "Acme <you@yourdomain.com>", # bare address works too
23
23
  "to": "customer@example.com",
24
24
  "subject": "Hello",
@@ -111,8 +111,8 @@ event = client.webhooks.verify(payload=raw_body, secret=secret, headers=request.
111
111
  Pass your own to dedupe across separate calls:
112
112
 
113
113
  ```python
114
- unitpost.emails.send({...}, idempotency_key="...")
115
- unitpost.emails.batch([...], idempotency_key="...")
114
+ unitpost.email.send({...}, idempotency_key="...")
115
+ unitpost.email.batch([...], idempotency_key="...")
116
116
  ```
117
117
 
118
118
  > The server dedupes on `(workspace, idempotency key)` for 24h and replays the
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "unitpost"
7
- version = "0.1.0"
7
+ version = "0.2.0"
8
8
  description = "Official Unitpost SDK for Python — send email and manage contacts, segments, campaigns, templates, brand kits, domains, suppressions, webhooks, and usage."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -3,7 +3,7 @@
3
3
  from unitpost import Unitpost
4
4
 
5
5
  unitpost = Unitpost() # reads UNITPOST_API_KEY
6
- result = unitpost.emails.send({
6
+ result = unitpost.email.send({
7
7
  "from": "Acme <you@yourdomain.com>",
8
8
  "to": "customer@example.com",
9
9
  "subject": "Hello",
@@ -25,15 +25,11 @@ from ._http import HttpClient
25
25
  from .resources import (
26
26
  ApiKeys,
27
27
  BrandKits,
28
- Campaigns,
29
28
  ContactFields,
30
29
  Contacts,
31
- Domains,
32
- Emails,
30
+ Email,
33
31
  Segments,
34
32
  Suppressions,
35
- Templates,
36
- Topics,
37
33
  Usage,
38
34
  Webhooks,
39
35
  )
@@ -65,15 +61,11 @@ class Unitpost:
65
61
  sleep=sleep,
66
62
  )
67
63
  self._http = http
68
- self.emails = Emails(http)
64
+ self.email = Email(http)
69
65
  self.contacts = Contacts(http)
70
66
  self.contact_fields = ContactFields(http)
71
67
  self.segments = Segments(http)
72
- self.topics = Topics(http)
73
- self.campaigns = Campaigns(http)
74
- self.templates = Templates(http)
75
68
  self.brand_kits = BrandKits(http)
76
- self.domains = Domains(http)
77
69
  self.webhooks = Webhooks(http)
78
70
  self.api_keys = ApiKeys(http)
79
71
  self.suppressions = Suppressions(http)