capimail 0.1.1__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.
- capimail/__init__.py +40 -0
- capimail/_client.py +668 -0
- capimail/_transport.py +92 -0
- capimail/_version.py +1 -0
- capimail/errors.py +53 -0
- capimail/py.typed +0 -0
- capimail/types.py +362 -0
- capimail/webhooks.py +129 -0
- capimail-0.1.1.dist-info/METADATA +321 -0
- capimail-0.1.1.dist-info/RECORD +11 -0
- capimail-0.1.1.dist-info/WHEEL +4 -0
capimail/__init__.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""CapiMail - official Python client for the CapiMail API.
|
|
2
|
+
|
|
3
|
+
Transactional email, suppressions, credits, the Email Validation, OTP and
|
|
4
|
+
Domain Health add-ons, and webhook signature verification. Zero dependencies.
|
|
5
|
+
|
|
6
|
+
from capimail import CapiMail
|
|
7
|
+
|
|
8
|
+
capimail = CapiMail(os.environ["CAPIMAIL_API_KEY"])
|
|
9
|
+
result = capimail.emails.send(
|
|
10
|
+
from_="hello@your-verified-domain.com",
|
|
11
|
+
to="customer@example.com",
|
|
12
|
+
subject="Welcome",
|
|
13
|
+
html="<h1>Welcome</h1>",
|
|
14
|
+
idempotency_key="welcome-user-123",
|
|
15
|
+
)
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from . import webhooks
|
|
19
|
+
from ._client import DEFAULT_BASE_URL, CapiMail, build_send_body
|
|
20
|
+
from ._transport import HttpRequest, HttpResponse, Transport, urllib_transport
|
|
21
|
+
from ._version import __version__
|
|
22
|
+
from .errors import CapiMailConnectionError, CapiMailError, WebhookSignatureError
|
|
23
|
+
from .types import * # noqa: F401,F403
|
|
24
|
+
from .types import __all__ as _types_all
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"CapiMail",
|
|
28
|
+
"CapiMailError",
|
|
29
|
+
"CapiMailConnectionError",
|
|
30
|
+
"WebhookSignatureError",
|
|
31
|
+
"DEFAULT_BASE_URL",
|
|
32
|
+
"HttpRequest",
|
|
33
|
+
"HttpResponse",
|
|
34
|
+
"Transport",
|
|
35
|
+
"build_send_body",
|
|
36
|
+
"urllib_transport",
|
|
37
|
+
"webhooks",
|
|
38
|
+
"__version__",
|
|
39
|
+
*_types_all,
|
|
40
|
+
]
|