mailsocket 0.1.0__tar.gz → 0.1.1__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.
- {mailsocket-0.1.0 → mailsocket-0.1.1}/PKG-INFO +16 -4
- {mailsocket-0.1.0 → mailsocket-0.1.1}/README.md +13 -3
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket/__init__.py +1 -1
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket/client.py +1 -1
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket.egg-info/PKG-INFO +16 -4
- {mailsocket-0.1.0 → mailsocket-0.1.1}/pyproject.toml +3 -1
- {mailsocket-0.1.0 → mailsocket-0.1.1}/tests/test_client.py +19 -0
- {mailsocket-0.1.0 → mailsocket-0.1.1}/LICENSE +0 -0
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket/errors.py +0 -0
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket.egg-info/SOURCES.txt +0 -0
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket.egg-info/dependency_links.txt +0 -0
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket.egg-info/requires.txt +0 -0
- {mailsocket-0.1.0 → mailsocket-0.1.1}/mailsocket.egg-info/top_level.txt +0 -0
- {mailsocket-0.1.0 → mailsocket-0.1.1}/setup.cfg +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mailsocket
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Official Python client for the mailsocket REST API — one line to wait for an OTP.
|
|
5
5
|
Author: mailsocket
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://mailsocket.app
|
|
8
8
|
Project-URL: Documentation, https://dash.mailsocket.app/docs
|
|
9
|
+
Project-URL: Source, https://github.com/mailsocket/mailsocket-sdk/tree/main/python
|
|
10
|
+
Project-URL: Issues, https://github.com/mailsocket/mailsocket-sdk/issues
|
|
9
11
|
Keywords: mailsocket,email,otp,inbox,magic-link
|
|
10
12
|
Classifier: Intended Audience :: Developers
|
|
11
13
|
Classifier: Operating System :: OS Independent
|
|
@@ -70,11 +72,21 @@ client = Client(api_key, base_url="https://dash.mailsocket.app/api/v1")
|
|
|
70
72
|
### The moat
|
|
71
73
|
|
|
72
74
|
```python
|
|
73
|
-
result = client.wait_for_otp(
|
|
74
|
-
result = client.wait_for_link(
|
|
75
|
-
result = client.wait(
|
|
75
|
+
result = client.wait_for_otp("inbox_abc123", timeout=60, min_confidence=0.0, since=0)
|
|
76
|
+
result = client.wait_for_link("inbox_abc123", timeout=60, since=0)
|
|
77
|
+
result = client.wait("inbox_abc123", timeout=60, min_confidence=0.0, since=0) # otp OR link
|
|
76
78
|
```
|
|
77
79
|
|
|
80
|
+
All three return a `WaitResult` and take keyword-only arguments after
|
|
81
|
+
`inbox_id`. `timeout`/`min_confidence`/`since` shown above are the defaults —
|
|
82
|
+
call with no extra arguments for the common case.
|
|
83
|
+
|
|
84
|
+
| Method | Keyword args (all optional, keyword-only) | Returns |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| `wait_for_otp(inbox_id, ...)` | `timeout=60`, `min_confidence=0.0`, `since=0` | `WaitResult` |
|
|
87
|
+
| `wait_for_link(inbox_id, ...)` | `timeout=60`, `since=0` | `WaitResult` |
|
|
88
|
+
| `wait(inbox_id, ...)` | `timeout=60`, `min_confidence=0.0`, `since=0` | `WaitResult` (otp OR link) |
|
|
89
|
+
|
|
78
90
|
`WaitResult` exposes `.otp`, `.confidence`, `.magic_link` (and `.link` as an
|
|
79
91
|
alias), plus the full `.message` dict. `str(result)` is the OTP (or the link).
|
|
80
92
|
|
|
@@ -46,11 +46,21 @@ client = Client(api_key, base_url="https://dash.mailsocket.app/api/v1")
|
|
|
46
46
|
### The moat
|
|
47
47
|
|
|
48
48
|
```python
|
|
49
|
-
result = client.wait_for_otp(
|
|
50
|
-
result = client.wait_for_link(
|
|
51
|
-
result = client.wait(
|
|
49
|
+
result = client.wait_for_otp("inbox_abc123", timeout=60, min_confidence=0.0, since=0)
|
|
50
|
+
result = client.wait_for_link("inbox_abc123", timeout=60, since=0)
|
|
51
|
+
result = client.wait("inbox_abc123", timeout=60, min_confidence=0.0, since=0) # otp OR link
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
All three return a `WaitResult` and take keyword-only arguments after
|
|
55
|
+
`inbox_id`. `timeout`/`min_confidence`/`since` shown above are the defaults —
|
|
56
|
+
call with no extra arguments for the common case.
|
|
57
|
+
|
|
58
|
+
| Method | Keyword args (all optional, keyword-only) | Returns |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| `wait_for_otp(inbox_id, ...)` | `timeout=60`, `min_confidence=0.0`, `since=0` | `WaitResult` |
|
|
61
|
+
| `wait_for_link(inbox_id, ...)` | `timeout=60`, `since=0` | `WaitResult` |
|
|
62
|
+
| `wait(inbox_id, ...)` | `timeout=60`, `min_confidence=0.0`, `since=0` | `WaitResult` (otp OR link) |
|
|
63
|
+
|
|
54
64
|
`WaitResult` exposes `.otp`, `.confidence`, `.magic_link` (and `.link` as an
|
|
55
65
|
alias), plus the full `.message` dict. `str(result)` is the OTP (or the link).
|
|
56
66
|
|
|
@@ -249,7 +249,7 @@ class Client:
|
|
|
249
249
|
headers = {
|
|
250
250
|
"Authorization": f"Bearer {self._api_key}",
|
|
251
251
|
"Accept": "application/json",
|
|
252
|
-
"User-Agent": "mailsocket-python/0.1.
|
|
252
|
+
"User-Agent": "mailsocket-python/0.1.1",
|
|
253
253
|
}
|
|
254
254
|
data = None
|
|
255
255
|
if json_body is not None:
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mailsocket
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Official Python client for the mailsocket REST API — one line to wait for an OTP.
|
|
5
5
|
Author: mailsocket
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://mailsocket.app
|
|
8
8
|
Project-URL: Documentation, https://dash.mailsocket.app/docs
|
|
9
|
+
Project-URL: Source, https://github.com/mailsocket/mailsocket-sdk/tree/main/python
|
|
10
|
+
Project-URL: Issues, https://github.com/mailsocket/mailsocket-sdk/issues
|
|
9
11
|
Keywords: mailsocket,email,otp,inbox,magic-link
|
|
10
12
|
Classifier: Intended Audience :: Developers
|
|
11
13
|
Classifier: Operating System :: OS Independent
|
|
@@ -70,11 +72,21 @@ client = Client(api_key, base_url="https://dash.mailsocket.app/api/v1")
|
|
|
70
72
|
### The moat
|
|
71
73
|
|
|
72
74
|
```python
|
|
73
|
-
result = client.wait_for_otp(
|
|
74
|
-
result = client.wait_for_link(
|
|
75
|
-
result = client.wait(
|
|
75
|
+
result = client.wait_for_otp("inbox_abc123", timeout=60, min_confidence=0.0, since=0)
|
|
76
|
+
result = client.wait_for_link("inbox_abc123", timeout=60, since=0)
|
|
77
|
+
result = client.wait("inbox_abc123", timeout=60, min_confidence=0.0, since=0) # otp OR link
|
|
76
78
|
```
|
|
77
79
|
|
|
80
|
+
All three return a `WaitResult` and take keyword-only arguments after
|
|
81
|
+
`inbox_id`. `timeout`/`min_confidence`/`since` shown above are the defaults —
|
|
82
|
+
call with no extra arguments for the common case.
|
|
83
|
+
|
|
84
|
+
| Method | Keyword args (all optional, keyword-only) | Returns |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| `wait_for_otp(inbox_id, ...)` | `timeout=60`, `min_confidence=0.0`, `since=0` | `WaitResult` |
|
|
87
|
+
| `wait_for_link(inbox_id, ...)` | `timeout=60`, `since=0` | `WaitResult` |
|
|
88
|
+
| `wait(inbox_id, ...)` | `timeout=60`, `min_confidence=0.0`, `since=0` | `WaitResult` (otp OR link) |
|
|
89
|
+
|
|
78
90
|
`WaitResult` exposes `.otp`, `.confidence`, `.magic_link` (and `.link` as an
|
|
79
91
|
alias), plus the full `.message` dict. `str(result)` is the OTP (or the link).
|
|
80
92
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mailsocket"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "Official Python client for the mailsocket REST API — one line to wait for an OTP."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -30,6 +30,8 @@ dev = ["pytest>=7"]
|
|
|
30
30
|
[project.urls]
|
|
31
31
|
Homepage = "https://mailsocket.app"
|
|
32
32
|
Documentation = "https://dash.mailsocket.app/docs"
|
|
33
|
+
Source = "https://github.com/mailsocket/mailsocket-sdk/tree/main/python"
|
|
34
|
+
Issues = "https://github.com/mailsocket/mailsocket-sdk/issues"
|
|
33
35
|
|
|
34
36
|
[tool.setuptools]
|
|
35
37
|
packages = ["mailsocket"]
|
|
@@ -354,3 +354,22 @@ def test_error_types_are_mailsocket_subclasses():
|
|
|
354
354
|
|
|
355
355
|
def test_version_exported():
|
|
356
356
|
assert hasattr(mailsocket, "__version__")
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
def test_metadata_consistency_across_files():
|
|
360
|
+
"""0.1.1 must match everywhere: pyproject, __version__, user agent, and MCP sibling."""
|
|
361
|
+
import re
|
|
362
|
+
import tomllib
|
|
363
|
+
from pathlib import Path
|
|
364
|
+
|
|
365
|
+
root = Path(__file__).resolve().parents[1]
|
|
366
|
+
expected = "0.1.1"
|
|
367
|
+
|
|
368
|
+
pyproject = tomllib.loads((root / "pyproject.toml").read_text())
|
|
369
|
+
assert pyproject["project"]["version"] == expected
|
|
370
|
+
assert mailsocket.__version__ == expected
|
|
371
|
+
|
|
372
|
+
client_src = (root / "mailsocket" / "client.py").read_text()
|
|
373
|
+
match = re.search(r'"mailsocket-python/([^"]+)"', client_src)
|
|
374
|
+
assert match, "User-Agent literal not found in client.py"
|
|
375
|
+
assert match.group(1) == expected
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|