agentisend 0.1.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.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentisend
3
+ Version: 0.1.0
4
+ Summary: AgentiSend is a transactional email API for AI agents. A send budget on every key, a preflight that sends nothing, refusals that name the fix, one call that stops every sender.
5
+ Author-email: AgentiSend <hello@agentisend.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://agentisend.com
8
+ Project-URL: Documentation, https://agentisend.com/docs
9
+ Project-URL: Source, https://github.com/fortuneflick/agentisend-python
10
+ Project-URL: Issues, https://github.com/fortuneflick/agentisend-python/issues
11
+ Keywords: email,email-api,transactional-email,ai-agents,agents,mcp,webhooks,resend-alternative
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Topic :: Communications :: Email
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+
21
+ <img src="https://agentisend.com/brand/lockup-horizontal-light.png#gh-light-mode-only" alt="AgentiSend" width="200" />
22
+ <img src="https://agentisend.com/brand/lockup-horizontal-dark.png#gh-dark-mode-only" alt="AgentiSend" width="200" />
23
+
24
+ # agentisend (Python)
25
+
26
+ Official Python SDK for the AgentiSend API. Standard library only — zero dependencies, Python 3.11+.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ pip install agentisend
32
+ ```
33
+
34
+ The source is public at https://github.com/fortuneflick/agentisend-python.
35
+
36
+ ## Quickstart
37
+
38
+ ```python
39
+ from agentisend import AgentiSend, idempotency_key
40
+
41
+ client = AgentiSend() # reads AGENTISEND_API_KEY and AGENTISEND_BASE_URL
42
+
43
+ sent = client.send_email(
44
+ {"from": "you@yourdomain.com", "to": "them@example.com",
45
+ "subject": "Hello", "text": "First send."},
46
+ idempotency=idempotency_key("welcome-email", "user_123"),
47
+ )
48
+ print(sent["id"])
49
+
50
+ email = client.get_email(sent["id"])
51
+ print(email["status"]) # queued -> sent -> delivered ...
52
+ ```
53
+
54
+ ## Errors name the fix
55
+
56
+ Every 4xx/5xx raises `AgentiSendError` carrying `code`, `message`, `fix`,
57
+ `docs_url`, `status`, `retry_after_seconds` (from Retry-After when present)
58
+ and `request_id`. A response that is not the documented envelope raises
59
+ `AgentiSendTransportError`.
60
+
61
+ ## Surface
62
+
63
+ emails (`send_email`, `send_email_batch`, `get_email`, `list_emails`, `list_email_events`) ·
64
+ api keys (+ `rotate_api_key`) · domains (+ verify, `wait_for_domain`) ·
65
+ webhooks (+ replay, dead letters, `list_webhook_deliveries`, `rotate_webhook_secret`) ·
66
+ limits (+ per-key kill, `kill_all`) · trust standing, and the rest of the API.
67
+
68
+ Parity is pinned by CI: every method and path in the committed `openapi.json`
69
+ that an API key may call has a client method, matched on the full path. The
70
+ few a key is refused (resuming a kill switch, approving a held send, billing,
71
+ team membership) are a person's, in the console. `packages/sdk-python/quickstart.py`
72
+ is run by the test suite against a local AgentiSend server in `pnpm test`.
73
+
74
+ ## Tests
75
+
76
+ ```bash
77
+ python3 -m unittest discover -s packages/sdk-python/tests
78
+ ```
@@ -0,0 +1,58 @@
1
+ <img src="https://agentisend.com/brand/lockup-horizontal-light.png#gh-light-mode-only" alt="AgentiSend" width="200" />
2
+ <img src="https://agentisend.com/brand/lockup-horizontal-dark.png#gh-dark-mode-only" alt="AgentiSend" width="200" />
3
+
4
+ # agentisend (Python)
5
+
6
+ Official Python SDK for the AgentiSend API. Standard library only — zero dependencies, Python 3.11+.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ pip install agentisend
12
+ ```
13
+
14
+ The source is public at https://github.com/fortuneflick/agentisend-python.
15
+
16
+ ## Quickstart
17
+
18
+ ```python
19
+ from agentisend import AgentiSend, idempotency_key
20
+
21
+ client = AgentiSend() # reads AGENTISEND_API_KEY and AGENTISEND_BASE_URL
22
+
23
+ sent = client.send_email(
24
+ {"from": "you@yourdomain.com", "to": "them@example.com",
25
+ "subject": "Hello", "text": "First send."},
26
+ idempotency=idempotency_key("welcome-email", "user_123"),
27
+ )
28
+ print(sent["id"])
29
+
30
+ email = client.get_email(sent["id"])
31
+ print(email["status"]) # queued -> sent -> delivered ...
32
+ ```
33
+
34
+ ## Errors name the fix
35
+
36
+ Every 4xx/5xx raises `AgentiSendError` carrying `code`, `message`, `fix`,
37
+ `docs_url`, `status`, `retry_after_seconds` (from Retry-After when present)
38
+ and `request_id`. A response that is not the documented envelope raises
39
+ `AgentiSendTransportError`.
40
+
41
+ ## Surface
42
+
43
+ emails (`send_email`, `send_email_batch`, `get_email`, `list_emails`, `list_email_events`) ·
44
+ api keys (+ `rotate_api_key`) · domains (+ verify, `wait_for_domain`) ·
45
+ webhooks (+ replay, dead letters, `list_webhook_deliveries`, `rotate_webhook_secret`) ·
46
+ limits (+ per-key kill, `kill_all`) · trust standing, and the rest of the API.
47
+
48
+ Parity is pinned by CI: every method and path in the committed `openapi.json`
49
+ that an API key may call has a client method, matched on the full path. The
50
+ few a key is refused (resuming a kill switch, approving a held send, billing,
51
+ team membership) are a person's, in the console. `packages/sdk-python/quickstart.py`
52
+ is run by the test suite against a local AgentiSend server in `pnpm test`.
53
+
54
+ ## Tests
55
+
56
+ ```bash
57
+ python3 -m unittest discover -s packages/sdk-python/tests
58
+ ```
@@ -0,0 +1,18 @@
1
+ """AgentiSend — agent-first email API. Python SDK (standard library only)."""
2
+
3
+ from ._version import __version__
4
+ from .client import DEFAULT_BASE_URL, AgentiSend, idempotency_key
5
+ from .errors import RESEND_ERROR_ALIASES, AgentiSendError, AgentiSendTransportError
6
+
7
+ PACKAGE_NAME = "agentisend"
8
+
9
+ __all__ = [
10
+ "AgentiSend",
11
+ "AgentiSendError",
12
+ "AgentiSendTransportError",
13
+ "RESEND_ERROR_ALIASES",
14
+ "idempotency_key",
15
+ "DEFAULT_BASE_URL",
16
+ "PACKAGE_NAME",
17
+ "__version__",
18
+ ]
@@ -0,0 +1,3 @@
1
+ """The package version, in one place: the user agent and ``__version__`` both read it."""
2
+
3
+ __version__ = "0.1.0"