listmonk-api 2.3.8__tar.gz → 2.3.9__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.
- {listmonk_api-2.3.8/listmonk_api.egg-info → listmonk_api-2.3.9}/PKG-INFO +15 -15
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/README.md +13 -13
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_base.py +26 -15
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/auth.py +1 -1
- listmonk_api-2.3.9/listmonk_api/connector_contracts.py +856 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/kg_ingest.py +15 -5
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/mcp_server.py +20 -3
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/ontology/__init__.py +1 -1
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/ontology/certification.json +3 -3
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/ontology/listmonk.ttl +11 -31
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/ontology/shapes/connector.shacl.ttl +2 -22
- listmonk_api-2.3.9/listmonk_api/prompts/listmonk-mcp-listmonk-administrator.json +73 -0
- listmonk_api-2.3.9/listmonk_api/prompts/listmonk-mcp-operator.json +72 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-api-development/SKILL.md +17 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-api-operations/SKILL.md +16 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-campaign-management/SKILL.md +19 -7
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-subscriber-lists/SKILL.md +19 -7
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-transactional-messaging/SKILL.md +18 -7
- {listmonk_api-2.3.8 → listmonk_api-2.3.9/listmonk_api.egg-info}/PKG-INFO +15 -15
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api.egg-info/SOURCES.txt +5 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api.egg-info/requires.txt +1 -1
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/pyproject.toml +2 -3
- listmonk_api-2.3.9/requirements.txt +1 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_api_clients.py +98 -32
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_kg_ingest.py +26 -3
- listmonk_api-2.3.9/tests/test_pack_extends_core.py +48 -0
- listmonk_api-2.3.9/tests/test_scion_sdk_0_10_imports.py +59 -0
- listmonk_api-2.3.8/requirements.txt +0 -1
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/LICENSE +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/MANIFEST.in +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/__init__.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/__main__.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/__init__.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_campaigns.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_import_api.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_lists.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_media.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_subscribers.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_templates.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api/api_client_transactional.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/api_client.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/connector_sources.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/mcp_config.json +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/models.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/ontology/fixtures/records.json +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/ontology/mappings/source.yaml +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/ontology/migrations/manifest.json +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-api-operations/agents/openai.yaml +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-api-operations/references/catalog.md +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-campaign-management/WORKFLOW.md +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-subscriber-lists/WORKFLOW.md +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api/skills/listmonk-transactional-messaging/WORKFLOW.md +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api.egg-info/dependency_links.txt +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api.egg-info/entry_points.txt +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/listmonk_api.egg-info/top_level.txt +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/setup.cfg +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/conftest.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_action_discovery.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_auth_and_server.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_fleet_name.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_init.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_init_dynamics.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_mcp_server.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_publication_workflow.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_startup.py +0 -0
- {listmonk_api-2.3.8 → listmonk_api-2.3.9}/tests/test_token_auth.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: listmonk-api
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.9
|
|
4
4
|
Summary: Agent package for Listmonk
|
|
5
5
|
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
6
|
License: MIT
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: scion-sdk[mcp]<0.
|
|
15
|
+
Requires-Dist: scion-sdk[mcp]<0.15,>=0.14.1
|
|
16
16
|
Requires-Dist: requests>=2.34.2
|
|
17
17
|
Provides-Extra: test
|
|
18
18
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
@@ -43,9 +43,9 @@ Dynamic: license-file
|
|
|
43
43
|

|
|
44
44
|

|
|
45
45
|
|
|
46
|
-
> **Documentation** — Installation, deployment, usage across the API, CLI, MCP,
|
|
47
|
-
> agent interfaces
|
|
48
|
-
>
|
|
46
|
+
> **Documentation** — Installation, deployment, and usage across the API, CLI, MCP,
|
|
47
|
+
> and A2A agent interfaces are maintained in the
|
|
48
|
+
> [official documentation](https://knuckles-team.github.io/listmonk-api/).
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
@@ -88,7 +88,7 @@ Auto-generated — do not edit between the markers below.
|
|
|
88
88
|
|----------|----------------|-------------|
|
|
89
89
|
| `listmonk_campaigns` | `LISTMONK_CAMPAIGNSTOOL` | Manage listmonk campaigns operations. |
|
|
90
90
|
| `listmonk_imports` | `LISTMONK_IMPORTSTOOL` | Manage listmonk imports operations. |
|
|
91
|
-
| `listmonk_ingest` | `LISTMONK_INGESTTOOL` | Natively ingest Listmonk records into
|
|
91
|
+
| `listmonk_ingest` | `LISTMONK_INGESTTOOL` | Natively ingest Listmonk records into medulla as typed nodes + documents. |
|
|
92
92
|
| `listmonk_lists` | `LISTMONK_LISTSTOOL` | Manage listmonk lists operations. |
|
|
93
93
|
| `listmonk_media` | `LISTMONK_MEDIATOOL` | Manage listmonk media operations. |
|
|
94
94
|
| `listmonk_subscribers` | `LISTMONK_SUBSCRIBERSTOOL` | Manage listmonk subscribers operations. |
|
|
@@ -163,7 +163,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
163
163
|
|
|
164
164
|
> **Install the connector-focused `[mcp]` extra.** Examples use `listmonk-api[mcp]` to add
|
|
165
165
|
> FastMCP / FastAPI through `scion-sdk`; the required Scion SDK core
|
|
166
|
-
> still carries `
|
|
166
|
+
> still carries `medulla`. The `[agent-runtime]` extra additionally
|
|
167
167
|
> enables model orchestration.
|
|
168
168
|
|
|
169
169
|
#### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
|
|
@@ -300,6 +300,8 @@ the detailed transport contract.
|
|
|
300
300
|
`MCP_ALLOWED_HOSTS` in `AgentConfig`.
|
|
301
301
|
<!-- END GENERATED: additional-deployment-options -->
|
|
302
302
|
|
|
303
|
+
---
|
|
304
|
+
|
|
303
305
|
## Agent
|
|
304
306
|
|
|
305
307
|
This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts smoothly with the **Agent Web UI (AG-UI)** and Terminal interface.
|
|
@@ -504,7 +506,7 @@ Pick the extra that matches what the operator want to run:
|
|
|
504
506
|
|
|
505
507
|
| Extra | Installs | Use when |
|
|
506
508
|
|-------|----------|----------|
|
|
507
|
-
| `listmonk-api[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `
|
|
509
|
+
| `listmonk-api[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `medulla`) | The operator only run the **MCP server** (smallest install / image) |
|
|
508
510
|
| `listmonk-api[all]` | Everything (`mcp` + `agent` + `logfire`) | Development / both surfaces |
|
|
509
511
|
|
|
510
512
|
```bash
|
|
@@ -523,7 +525,7 @@ One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
|
|
|
523
525
|
|
|
524
526
|
| Image tag | Build target | Contents | Entrypoint |
|
|
525
527
|
|-----------|--------------|----------|------------|
|
|
526
|
-
| `example/listmonk-api:mcp` | `--target mcp` | `listmonk-api[mcp]` — **connector-focused**, includes `
|
|
528
|
+
| `example/listmonk-api:mcp` | `--target mcp` | `listmonk-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `listmonk-mcp` |
|
|
527
529
|
|
|
528
530
|
```bash
|
|
529
531
|
docker build --target mcp -t example/listmonk-api:mcp docker/ # connector-focused MCP server
|
|
@@ -531,14 +533,14 @@ docker build --target mcp -t example/listmonk-api:mcp docker/ # connector
|
|
|
531
533
|
|
|
532
534
|
agent (`immutable agent digest`) with a co-located `:mcp` sidecar.
|
|
533
535
|
|
|
534
|
-
### Knowledge-graph database (`
|
|
536
|
+
### Knowledge-graph database (`medulla`)
|
|
535
537
|
|
|
536
|
-
Scion SDK core dependency (`
|
|
538
|
+
Scion SDK core dependency (`medulla`). The `[mcp]` extra keeps
|
|
537
539
|
deployments can use the bundled engine. For production or shared state, run
|
|
538
|
-
**
|
|
540
|
+
**medulla as a dedicated database service** and configure the runtime to use it.
|
|
539
541
|
Deployment recipes (single-node + Raft HA), connection configuration, and architecture
|
|
540
542
|
diagrams are documented in the
|
|
541
|
-
[
|
|
543
|
+
[medulla deployment guide](https://knuckles-team.github.io/medulla/deployment/).
|
|
542
544
|
|
|
543
545
|
---
|
|
544
546
|
|
|
@@ -576,8 +578,6 @@ Contributions are welcome! Please ensure code quality by running local checks be
|
|
|
576
578
|
- Validate type-safety with `mypy .`
|
|
577
579
|
- Ran test suites using `pytest`
|
|
578
580
|
|
|
579
|
-
|
|
580
|
-
|
|
581
581
|
<!-- GOVERNED-CAPABILITY:START -->
|
|
582
582
|
## Governed capability contract
|
|
583
583
|
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|

|
|
21
21
|

|
|
22
22
|
|
|
23
|
-
> **Documentation** — Installation, deployment, usage across the API, CLI, MCP,
|
|
24
|
-
> agent interfaces
|
|
25
|
-
>
|
|
23
|
+
> **Documentation** — Installation, deployment, and usage across the API, CLI, MCP,
|
|
24
|
+
> and A2A agent interfaces are maintained in the
|
|
25
|
+
> [official documentation](https://knuckles-team.github.io/listmonk-api/).
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
@@ -65,7 +65,7 @@ Auto-generated — do not edit between the markers below.
|
|
|
65
65
|
|----------|----------------|-------------|
|
|
66
66
|
| `listmonk_campaigns` | `LISTMONK_CAMPAIGNSTOOL` | Manage listmonk campaigns operations. |
|
|
67
67
|
| `listmonk_imports` | `LISTMONK_IMPORTSTOOL` | Manage listmonk imports operations. |
|
|
68
|
-
| `listmonk_ingest` | `LISTMONK_INGESTTOOL` | Natively ingest Listmonk records into
|
|
68
|
+
| `listmonk_ingest` | `LISTMONK_INGESTTOOL` | Natively ingest Listmonk records into medulla as typed nodes + documents. |
|
|
69
69
|
| `listmonk_lists` | `LISTMONK_LISTSTOOL` | Manage listmonk lists operations. |
|
|
70
70
|
| `listmonk_media` | `LISTMONK_MEDIATOOL` | Manage listmonk media operations. |
|
|
71
71
|
| `listmonk_subscribers` | `LISTMONK_SUBSCRIBERSTOOL` | Manage listmonk subscribers operations. |
|
|
@@ -140,7 +140,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
140
140
|
|
|
141
141
|
> **Install the connector-focused `[mcp]` extra.** Examples use `listmonk-api[mcp]` to add
|
|
142
142
|
> FastMCP / FastAPI through `scion-sdk`; the required Scion SDK core
|
|
143
|
-
> still carries `
|
|
143
|
+
> still carries `medulla`. The `[agent-runtime]` extra additionally
|
|
144
144
|
> enables model orchestration.
|
|
145
145
|
|
|
146
146
|
#### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
|
|
@@ -277,6 +277,8 @@ the detailed transport contract.
|
|
|
277
277
|
`MCP_ALLOWED_HOSTS` in `AgentConfig`.
|
|
278
278
|
<!-- END GENERATED: additional-deployment-options -->
|
|
279
279
|
|
|
280
|
+
---
|
|
281
|
+
|
|
280
282
|
## Agent
|
|
281
283
|
|
|
282
284
|
This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts smoothly with the **Agent Web UI (AG-UI)** and Terminal interface.
|
|
@@ -481,7 +483,7 @@ Pick the extra that matches what the operator want to run:
|
|
|
481
483
|
|
|
482
484
|
| Extra | Installs | Use when |
|
|
483
485
|
|-------|----------|----------|
|
|
484
|
-
| `listmonk-api[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `
|
|
486
|
+
| `listmonk-api[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `medulla`) | The operator only run the **MCP server** (smallest install / image) |
|
|
485
487
|
| `listmonk-api[all]` | Everything (`mcp` + `agent` + `logfire`) | Development / both surfaces |
|
|
486
488
|
|
|
487
489
|
```bash
|
|
@@ -500,7 +502,7 @@ One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
|
|
|
500
502
|
|
|
501
503
|
| Image tag | Build target | Contents | Entrypoint |
|
|
502
504
|
|-----------|--------------|----------|------------|
|
|
503
|
-
| `example/listmonk-api:mcp` | `--target mcp` | `listmonk-api[mcp]` — **connector-focused**, includes `
|
|
505
|
+
| `example/listmonk-api:mcp` | `--target mcp` | `listmonk-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `listmonk-mcp` |
|
|
504
506
|
|
|
505
507
|
```bash
|
|
506
508
|
docker build --target mcp -t example/listmonk-api:mcp docker/ # connector-focused MCP server
|
|
@@ -508,14 +510,14 @@ docker build --target mcp -t example/listmonk-api:mcp docker/ # connector
|
|
|
508
510
|
|
|
509
511
|
agent (`immutable agent digest`) with a co-located `:mcp` sidecar.
|
|
510
512
|
|
|
511
|
-
### Knowledge-graph database (`
|
|
513
|
+
### Knowledge-graph database (`medulla`)
|
|
512
514
|
|
|
513
|
-
Scion SDK core dependency (`
|
|
515
|
+
Scion SDK core dependency (`medulla`). The `[mcp]` extra keeps
|
|
514
516
|
deployments can use the bundled engine. For production or shared state, run
|
|
515
|
-
**
|
|
517
|
+
**medulla as a dedicated database service** and configure the runtime to use it.
|
|
516
518
|
Deployment recipes (single-node + Raft HA), connection configuration, and architecture
|
|
517
519
|
diagrams are documented in the
|
|
518
|
-
[
|
|
520
|
+
[medulla deployment guide](https://knuckles-team.github.io/medulla/deployment/).
|
|
519
521
|
|
|
520
522
|
---
|
|
521
523
|
|
|
@@ -553,8 +555,6 @@ Contributions are welcome! Please ensure code quality by running local checks be
|
|
|
553
555
|
- Validate type-safety with `mypy .`
|
|
554
556
|
- Ran test suites using `pytest`
|
|
555
557
|
|
|
556
|
-
|
|
557
|
-
|
|
558
558
|
<!-- GOVERNED-CAPABILITY:START -->
|
|
559
559
|
## Governed capability contract
|
|
560
560
|
|
|
@@ -45,15 +45,29 @@ def build_authorization(token: str, username: str | None = None) -> str:
|
|
|
45
45
|
return f"token {username}:{token}"
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
def mask_token(token: str) -> str:
|
|
49
|
+
"""Return a masked version of the token for logging/safe display.
|
|
50
|
+
|
|
51
|
+
Shows first and last 4 characters only.
|
|
52
|
+
"""
|
|
53
|
+
if len(token) <= 8:
|
|
54
|
+
return "***"
|
|
55
|
+
return token[:4] + "..." + token[-4:]
|
|
56
|
+
|
|
57
|
+
|
|
48
58
|
class BaseApiClient:
|
|
59
|
+
DEFAULT_TIMEOUT_SECONDS = 30
|
|
60
|
+
|
|
49
61
|
def __init__(
|
|
50
62
|
self,
|
|
51
63
|
url: str,
|
|
52
64
|
token: str,
|
|
53
65
|
tls_profile: ResolvedTLSProfile | None = None,
|
|
54
66
|
username: str | None = None,
|
|
67
|
+
timeout: float = DEFAULT_TIMEOUT_SECONDS,
|
|
55
68
|
):
|
|
56
69
|
self.base_url = url
|
|
70
|
+
self._timeout = timeout
|
|
57
71
|
self._session = requests.Session()
|
|
58
72
|
self.tls_profile = tls_profile or resolve_tls_profile("listmonk")
|
|
59
73
|
self.tls_profile.configure_requests_session(self._session)
|
|
@@ -64,29 +78,26 @@ class BaseApiClient:
|
|
|
64
78
|
}
|
|
65
79
|
)
|
|
66
80
|
|
|
67
|
-
def
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
def _build_url(self, endpoint: str) -> str:
|
|
82
|
+
return self.base_url.rstrip("/") + "/" + endpoint.lstrip("/")
|
|
83
|
+
|
|
84
|
+
def _request_with_timeout(self, method: str, url: str, **kwargs):
|
|
85
|
+
kwargs.setdefault("timeout", self._timeout)
|
|
86
|
+
response = getattr(self._session, method)(url, **kwargs)
|
|
70
87
|
response.raise_for_status()
|
|
71
88
|
return response
|
|
72
89
|
|
|
90
|
+
def get(self, endpoint: str, **kwargs):
|
|
91
|
+
return self._request_with_timeout("get", self._build_url(endpoint), **kwargs)
|
|
92
|
+
|
|
73
93
|
def post(self, endpoint: str, **kwargs):
|
|
74
|
-
|
|
75
|
-
response = self._session.post(url, **kwargs)
|
|
76
|
-
response.raise_for_status()
|
|
77
|
-
return response
|
|
94
|
+
return self._request_with_timeout("post", self._build_url(endpoint), **kwargs)
|
|
78
95
|
|
|
79
96
|
def put(self, endpoint: str, **kwargs):
|
|
80
|
-
|
|
81
|
-
response = self._session.put(url, **kwargs)
|
|
82
|
-
response.raise_for_status()
|
|
83
|
-
return response
|
|
97
|
+
return self._request_with_timeout("put", self._build_url(endpoint), **kwargs)
|
|
84
98
|
|
|
85
99
|
def delete(self, endpoint: str, **kwargs):
|
|
86
|
-
|
|
87
|
-
response = self._session.delete(url, **kwargs)
|
|
88
|
-
response.raise_for_status()
|
|
89
|
-
return response
|
|
100
|
+
return self._request_with_timeout("delete", self._build_url(endpoint), **kwargs)
|
|
90
101
|
|
|
91
102
|
def _paginate_results(self, request: PaginationRequest) -> list:
|
|
92
103
|
"""Fetch every page of a Listmonk list endpoint and flatten the results.
|
|
@@ -30,7 +30,7 @@ def get_client():
|
|
|
30
30
|
except (AuthError, UnauthorizedError) as e:
|
|
31
31
|
raise RuntimeError(
|
|
32
32
|
"AUTHENTICATION ERROR: The configured credentials were rejected. "
|
|
33
|
-
|
|
33
|
+
"Please verify the application environment variables and retry. "
|
|
34
34
|
f"Error details: {type(e).__name__}"
|
|
35
35
|
) from e
|
|
36
36
|
|