adcp 1.3.1__py3-none-any.whl → 1.4.0__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.
- adcp/__init__.py +1 -1
- adcp/client.py +5 -0
- adcp/exceptions.py +34 -0
- adcp/simple.py +347 -0
- adcp/testing/__init__.py +15 -0
- {adcp-1.3.1.dist-info → adcp-1.4.0.dist-info}/METADATA +46 -18
- {adcp-1.3.1.dist-info → adcp-1.4.0.dist-info}/RECORD +11 -10
- {adcp-1.3.1.dist-info → adcp-1.4.0.dist-info}/WHEEL +0 -0
- {adcp-1.3.1.dist-info → adcp-1.4.0.dist-info}/entry_points.txt +0 -0
- {adcp-1.3.1.dist-info → adcp-1.4.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-1.3.1.dist-info → adcp-1.4.0.dist-info}/top_level.txt +0 -0
adcp/__init__.py
CHANGED
adcp/client.py
CHANGED
|
@@ -86,6 +86,11 @@ class ADCPClient:
|
|
|
86
86
|
else:
|
|
87
87
|
raise ValueError(f"Unsupported protocol: {agent_config.protocol}")
|
|
88
88
|
|
|
89
|
+
# Initialize simple API accessor (lazy import to avoid circular dependency)
|
|
90
|
+
from adcp.simple import SimpleAPI
|
|
91
|
+
|
|
92
|
+
self.simple = SimpleAPI(self)
|
|
93
|
+
|
|
89
94
|
def get_webhook_url(self, task_type: str, operation_id: str) -> str:
|
|
90
95
|
"""Generate webhook URL for a task."""
|
|
91
96
|
if not self.webhook_url_template:
|
adcp/exceptions.py
CHANGED
|
@@ -119,3 +119,37 @@ class ADCPWebhookSignatureError(ADCPWebhookError):
|
|
|
119
119
|
" Webhook signatures use HMAC-SHA256 for security."
|
|
120
120
|
)
|
|
121
121
|
super().__init__(message, agent_id, None, suggestion)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class ADCPSimpleAPIError(ADCPError):
|
|
125
|
+
"""Error from simplified API (.simple accessor).
|
|
126
|
+
|
|
127
|
+
Raised when a simple API method fails. The underlying error details
|
|
128
|
+
are available in the message. For more control over error handling,
|
|
129
|
+
use the standard API (client.method()) instead of client.simple.method().
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
def __init__(
|
|
133
|
+
self,
|
|
134
|
+
operation: str,
|
|
135
|
+
error_message: str | None = None,
|
|
136
|
+
agent_id: str | None = None,
|
|
137
|
+
):
|
|
138
|
+
"""Initialize simple API error.
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
operation: The operation that failed (e.g., "get_products")
|
|
142
|
+
error_message: The underlying error message from TaskResult
|
|
143
|
+
agent_id: Optional agent ID for context
|
|
144
|
+
"""
|
|
145
|
+
message = f"{operation} failed"
|
|
146
|
+
if error_message:
|
|
147
|
+
message = f"{message}: {error_message}"
|
|
148
|
+
|
|
149
|
+
suggestion = (
|
|
150
|
+
f"For more control over error handling, use the standard API:\n"
|
|
151
|
+
f" result = await client.{operation}(request)\n"
|
|
152
|
+
f" if not result.success:\n"
|
|
153
|
+
f" # Handle error with full TaskResult context"
|
|
154
|
+
)
|
|
155
|
+
super().__init__(message, agent_id, None, suggestion)
|
adcp/simple.py
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"""Simplified API accessor for ADCPClient.
|
|
2
|
+
|
|
3
|
+
Provides an ergonomic API with:
|
|
4
|
+
- Kwargs instead of request objects
|
|
5
|
+
- Direct return values (no TaskResult unwrapping)
|
|
6
|
+
- Raises exceptions on errors
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
client = ADCPClient(config)
|
|
10
|
+
|
|
11
|
+
# Standard API: full control
|
|
12
|
+
result = await client.get_products(GetProductsRequest(brief="Coffee"))
|
|
13
|
+
if result.success:
|
|
14
|
+
print(result.data.products)
|
|
15
|
+
|
|
16
|
+
# Simple API: ergonomic
|
|
17
|
+
products = await client.simple.get_products(brief="Coffee")
|
|
18
|
+
print(products.products)
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING, Any
|
|
24
|
+
|
|
25
|
+
from adcp.exceptions import ADCPSimpleAPIError
|
|
26
|
+
from adcp.types.generated import (
|
|
27
|
+
ActivateSignalRequest,
|
|
28
|
+
ActivateSignalResponse,
|
|
29
|
+
GetMediaBuyDeliveryRequest,
|
|
30
|
+
GetMediaBuyDeliveryResponse,
|
|
31
|
+
GetProductsRequest,
|
|
32
|
+
GetProductsResponse,
|
|
33
|
+
GetSignalsRequest,
|
|
34
|
+
GetSignalsResponse,
|
|
35
|
+
ListAuthorizedPropertiesRequest,
|
|
36
|
+
ListAuthorizedPropertiesResponse,
|
|
37
|
+
ListCreativeFormatsRequest,
|
|
38
|
+
ListCreativeFormatsResponse,
|
|
39
|
+
ListCreativesRequest,
|
|
40
|
+
ListCreativesResponse,
|
|
41
|
+
PreviewCreativeRequest,
|
|
42
|
+
PreviewCreativeResponse,
|
|
43
|
+
ProvidePerformanceFeedbackRequest,
|
|
44
|
+
ProvidePerformanceFeedbackResponse,
|
|
45
|
+
SyncCreativesRequest,
|
|
46
|
+
SyncCreativesResponse,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
if TYPE_CHECKING:
|
|
50
|
+
from adcp.client import ADCPClient
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class SimpleAPI:
|
|
54
|
+
"""Simplified API accessor for ergonomic usage.
|
|
55
|
+
|
|
56
|
+
Provides kwargs-based methods that return unwrapped response data
|
|
57
|
+
and raise exceptions on errors.
|
|
58
|
+
|
|
59
|
+
This is intended for:
|
|
60
|
+
- Quick prototyping and testing
|
|
61
|
+
- Documentation and examples
|
|
62
|
+
- Simple scripts and notebooks
|
|
63
|
+
|
|
64
|
+
For production code with complex error handling, use the standard
|
|
65
|
+
client API which returns TaskResult wrappers.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
def __init__(self, client: ADCPClient):
|
|
69
|
+
"""Initialize simple API accessor.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
client: The ADCPClient instance to wrap
|
|
73
|
+
"""
|
|
74
|
+
self._client = client
|
|
75
|
+
|
|
76
|
+
async def get_products(
|
|
77
|
+
self,
|
|
78
|
+
**kwargs: Any,
|
|
79
|
+
) -> GetProductsResponse:
|
|
80
|
+
"""Get advertising products (simplified).
|
|
81
|
+
|
|
82
|
+
This is a convenience wrapper around client.get_products() that:
|
|
83
|
+
- Accepts kwargs instead of GetProductsRequest
|
|
84
|
+
- Returns unwrapped GetProductsResponse
|
|
85
|
+
- Raises ADCPSimpleAPIError on failures
|
|
86
|
+
|
|
87
|
+
For full control over error handling, use client.get_products() instead.
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
**kwargs: Arguments for GetProductsRequest (brief, brand_manifest, etc.)
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
GetProductsResponse directly (no TaskResult wrapper)
|
|
94
|
+
|
|
95
|
+
Raises:
|
|
96
|
+
ADCPSimpleAPIError: If request fails. Use standard API for detailed error handling.
|
|
97
|
+
|
|
98
|
+
Example:
|
|
99
|
+
products = await client.simple.get_products(
|
|
100
|
+
brief='Coffee subscription service'
|
|
101
|
+
)
|
|
102
|
+
print(f"Found {len(products.products)} products")
|
|
103
|
+
"""
|
|
104
|
+
request = GetProductsRequest(**kwargs)
|
|
105
|
+
result = await self._client.get_products(request)
|
|
106
|
+
if not result.success or not result.data:
|
|
107
|
+
raise ADCPSimpleAPIError(
|
|
108
|
+
operation="get_products",
|
|
109
|
+
error_message=result.error,
|
|
110
|
+
agent_id=self._client.agent_config.id,
|
|
111
|
+
)
|
|
112
|
+
return result.data
|
|
113
|
+
|
|
114
|
+
async def list_creative_formats(
|
|
115
|
+
self,
|
|
116
|
+
**kwargs: Any,
|
|
117
|
+
) -> ListCreativeFormatsResponse:
|
|
118
|
+
"""List supported creative formats.
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
**kwargs: Arguments passed to ListCreativeFormatsRequest
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
ListCreativeFormatsResponse with formats list
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
Exception: If the request fails
|
|
128
|
+
|
|
129
|
+
Example:
|
|
130
|
+
formats = await client.simple.list_creative_formats()
|
|
131
|
+
print(f"Found {len(formats.formats)} formats")
|
|
132
|
+
"""
|
|
133
|
+
request = ListCreativeFormatsRequest(**kwargs)
|
|
134
|
+
result = await self._client.list_creative_formats(request)
|
|
135
|
+
if not result.success or not result.data:
|
|
136
|
+
raise ADCPSimpleAPIError(
|
|
137
|
+
operation="list_creative_formats",
|
|
138
|
+
error_message=result.error,
|
|
139
|
+
agent_id=self._client.agent_config.id,
|
|
140
|
+
)
|
|
141
|
+
return result.data
|
|
142
|
+
|
|
143
|
+
async def preview_creative(
|
|
144
|
+
self,
|
|
145
|
+
**kwargs: Any,
|
|
146
|
+
) -> PreviewCreativeResponse:
|
|
147
|
+
"""Preview creative manifest.
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
**kwargs: Arguments passed to PreviewCreativeRequest
|
|
151
|
+
|
|
152
|
+
Returns:
|
|
153
|
+
PreviewCreativeResponse with preview data
|
|
154
|
+
|
|
155
|
+
Raises:
|
|
156
|
+
Exception: If the request fails
|
|
157
|
+
|
|
158
|
+
Example:
|
|
159
|
+
preview = await client.simple.preview_creative(
|
|
160
|
+
manifest={'format_id': 'banner_300x250', 'assets': {...}}
|
|
161
|
+
)
|
|
162
|
+
print(f"Preview: {preview.previews[0]}")
|
|
163
|
+
"""
|
|
164
|
+
request = PreviewCreativeRequest(**kwargs)
|
|
165
|
+
result = await self._client.preview_creative(request)
|
|
166
|
+
if not result.success or not result.data:
|
|
167
|
+
raise ADCPSimpleAPIError(
|
|
168
|
+
operation="preview_creative",
|
|
169
|
+
error_message=result.error,
|
|
170
|
+
agent_id=self._client.agent_config.id,
|
|
171
|
+
)
|
|
172
|
+
return result.data
|
|
173
|
+
|
|
174
|
+
async def sync_creatives(
|
|
175
|
+
self,
|
|
176
|
+
**kwargs: Any,
|
|
177
|
+
) -> SyncCreativesResponse:
|
|
178
|
+
"""Sync creatives.
|
|
179
|
+
|
|
180
|
+
Args:
|
|
181
|
+
**kwargs: Arguments passed to SyncCreativesRequest
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
SyncCreativesResponse
|
|
185
|
+
|
|
186
|
+
Raises:
|
|
187
|
+
Exception: If the request fails
|
|
188
|
+
"""
|
|
189
|
+
request = SyncCreativesRequest(**kwargs)
|
|
190
|
+
result = await self._client.sync_creatives(request)
|
|
191
|
+
if not result.success or not result.data:
|
|
192
|
+
raise ADCPSimpleAPIError(
|
|
193
|
+
operation="sync_creatives",
|
|
194
|
+
error_message=result.error,
|
|
195
|
+
agent_id=self._client.agent_config.id,
|
|
196
|
+
)
|
|
197
|
+
return result.data
|
|
198
|
+
|
|
199
|
+
async def list_creatives(
|
|
200
|
+
self,
|
|
201
|
+
**kwargs: Any,
|
|
202
|
+
) -> ListCreativesResponse:
|
|
203
|
+
"""List creatives.
|
|
204
|
+
|
|
205
|
+
Args:
|
|
206
|
+
**kwargs: Arguments passed to ListCreativesRequest
|
|
207
|
+
|
|
208
|
+
Returns:
|
|
209
|
+
ListCreativesResponse
|
|
210
|
+
|
|
211
|
+
Raises:
|
|
212
|
+
Exception: If the request fails
|
|
213
|
+
"""
|
|
214
|
+
request = ListCreativesRequest(**kwargs)
|
|
215
|
+
result = await self._client.list_creatives(request)
|
|
216
|
+
if not result.success or not result.data:
|
|
217
|
+
raise ADCPSimpleAPIError(
|
|
218
|
+
operation="list_creatives",
|
|
219
|
+
error_message=result.error,
|
|
220
|
+
agent_id=self._client.agent_config.id,
|
|
221
|
+
)
|
|
222
|
+
return result.data
|
|
223
|
+
|
|
224
|
+
async def get_media_buy_delivery(
|
|
225
|
+
self,
|
|
226
|
+
**kwargs: Any,
|
|
227
|
+
) -> GetMediaBuyDeliveryResponse:
|
|
228
|
+
"""Get media buy delivery.
|
|
229
|
+
|
|
230
|
+
Args:
|
|
231
|
+
**kwargs: Arguments passed to GetMediaBuyDeliveryRequest
|
|
232
|
+
|
|
233
|
+
Returns:
|
|
234
|
+
GetMediaBuyDeliveryResponse
|
|
235
|
+
|
|
236
|
+
Raises:
|
|
237
|
+
Exception: If the request fails
|
|
238
|
+
"""
|
|
239
|
+
request = GetMediaBuyDeliveryRequest(**kwargs)
|
|
240
|
+
result = await self._client.get_media_buy_delivery(request)
|
|
241
|
+
if not result.success or not result.data:
|
|
242
|
+
raise ADCPSimpleAPIError(
|
|
243
|
+
operation="get_media_buy_delivery",
|
|
244
|
+
error_message=result.error,
|
|
245
|
+
agent_id=self._client.agent_config.id,
|
|
246
|
+
)
|
|
247
|
+
return result.data
|
|
248
|
+
|
|
249
|
+
async def list_authorized_properties(
|
|
250
|
+
self,
|
|
251
|
+
**kwargs: Any,
|
|
252
|
+
) -> ListAuthorizedPropertiesResponse:
|
|
253
|
+
"""List authorized properties.
|
|
254
|
+
|
|
255
|
+
Args:
|
|
256
|
+
**kwargs: Arguments passed to ListAuthorizedPropertiesRequest
|
|
257
|
+
|
|
258
|
+
Returns:
|
|
259
|
+
ListAuthorizedPropertiesResponse
|
|
260
|
+
|
|
261
|
+
Raises:
|
|
262
|
+
Exception: If the request fails
|
|
263
|
+
"""
|
|
264
|
+
request = ListAuthorizedPropertiesRequest(**kwargs)
|
|
265
|
+
result = await self._client.list_authorized_properties(request)
|
|
266
|
+
if not result.success or not result.data:
|
|
267
|
+
raise ADCPSimpleAPIError(
|
|
268
|
+
operation="list_authorized_properties",
|
|
269
|
+
error_message=result.error,
|
|
270
|
+
agent_id=self._client.agent_config.id,
|
|
271
|
+
)
|
|
272
|
+
return result.data
|
|
273
|
+
|
|
274
|
+
async def get_signals(
|
|
275
|
+
self,
|
|
276
|
+
**kwargs: Any,
|
|
277
|
+
) -> GetSignalsResponse:
|
|
278
|
+
"""Get signals.
|
|
279
|
+
|
|
280
|
+
Args:
|
|
281
|
+
**kwargs: Arguments passed to GetSignalsRequest
|
|
282
|
+
|
|
283
|
+
Returns:
|
|
284
|
+
GetSignalsResponse
|
|
285
|
+
|
|
286
|
+
Raises:
|
|
287
|
+
Exception: If the request fails
|
|
288
|
+
"""
|
|
289
|
+
request = GetSignalsRequest(**kwargs)
|
|
290
|
+
result = await self._client.get_signals(request)
|
|
291
|
+
if not result.success or not result.data:
|
|
292
|
+
raise ADCPSimpleAPIError(
|
|
293
|
+
operation="get_signals",
|
|
294
|
+
error_message=result.error,
|
|
295
|
+
agent_id=self._client.agent_config.id,
|
|
296
|
+
)
|
|
297
|
+
return result.data
|
|
298
|
+
|
|
299
|
+
async def activate_signal(
|
|
300
|
+
self,
|
|
301
|
+
**kwargs: Any,
|
|
302
|
+
) -> ActivateSignalResponse:
|
|
303
|
+
"""Activate signal.
|
|
304
|
+
|
|
305
|
+
Args:
|
|
306
|
+
**kwargs: Arguments passed to ActivateSignalRequest
|
|
307
|
+
|
|
308
|
+
Returns:
|
|
309
|
+
ActivateSignalResponse
|
|
310
|
+
|
|
311
|
+
Raises:
|
|
312
|
+
Exception: If the request fails
|
|
313
|
+
"""
|
|
314
|
+
request = ActivateSignalRequest(**kwargs)
|
|
315
|
+
result = await self._client.activate_signal(request)
|
|
316
|
+
if not result.success or not result.data:
|
|
317
|
+
raise ADCPSimpleAPIError(
|
|
318
|
+
operation="activate_signal",
|
|
319
|
+
error_message=result.error,
|
|
320
|
+
agent_id=self._client.agent_config.id,
|
|
321
|
+
)
|
|
322
|
+
return result.data
|
|
323
|
+
|
|
324
|
+
async def provide_performance_feedback(
|
|
325
|
+
self,
|
|
326
|
+
**kwargs: Any,
|
|
327
|
+
) -> ProvidePerformanceFeedbackResponse:
|
|
328
|
+
"""Provide performance feedback.
|
|
329
|
+
|
|
330
|
+
Args:
|
|
331
|
+
**kwargs: Arguments passed to ProvidePerformanceFeedbackRequest
|
|
332
|
+
|
|
333
|
+
Returns:
|
|
334
|
+
ProvidePerformanceFeedbackResponse
|
|
335
|
+
|
|
336
|
+
Raises:
|
|
337
|
+
Exception: If the request fails
|
|
338
|
+
"""
|
|
339
|
+
request = ProvidePerformanceFeedbackRequest(**kwargs)
|
|
340
|
+
result = await self._client.provide_performance_feedback(request)
|
|
341
|
+
if not result.success or not result.data:
|
|
342
|
+
raise ADCPSimpleAPIError(
|
|
343
|
+
operation="provide_performance_feedback",
|
|
344
|
+
error_message=result.error,
|
|
345
|
+
agent_id=self._client.agent_config.id,
|
|
346
|
+
)
|
|
347
|
+
return result.data
|
adcp/testing/__init__.py
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
"""Test helpers for AdCP client library.
|
|
2
2
|
|
|
3
3
|
Provides pre-configured test agents for examples and quick testing.
|
|
4
|
+
|
|
5
|
+
All test agents include a `.simple` accessor for ergonomic usage:
|
|
6
|
+
|
|
7
|
+
- **Standard API** (client methods): Full TaskResult with error handling
|
|
8
|
+
- **Simple API** (client.simple methods): Direct returns, raises on error
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
# Standard API - explicit control
|
|
12
|
+
result = await test_agent.get_products(GetProductsRequest(brief='Coffee'))
|
|
13
|
+
if result.success:
|
|
14
|
+
print(result.data.products)
|
|
15
|
+
|
|
16
|
+
# Simple API - ergonomic
|
|
17
|
+
products = await test_agent.simple.get_products(brief='Coffee')
|
|
18
|
+
print(products.products)
|
|
4
19
|
"""
|
|
5
20
|
|
|
6
21
|
from __future__ import annotations
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adcp
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Official Python client for the Ad Context Protocol (AdCP)
|
|
5
5
|
Author-email: AdCP Community <maintainers@adcontextprotocol.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -63,36 +63,64 @@ pip install adcp
|
|
|
63
63
|
|
|
64
64
|
## Quick Start: Test Helpers
|
|
65
65
|
|
|
66
|
-
The fastest way to get started is using
|
|
66
|
+
The fastest way to get started is using pre-configured test agents with the **`.simple` API**:
|
|
67
67
|
|
|
68
68
|
```python
|
|
69
69
|
from adcp.testing import test_agent
|
|
70
|
-
from adcp.types.generated import GetProductsRequest
|
|
71
70
|
|
|
72
|
-
# Zero configuration - just import and
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
brief="Coffee subscription service",
|
|
76
|
-
promoted_offering="Premium coffee deliveries"
|
|
77
|
-
)
|
|
71
|
+
# Zero configuration - just import and call with kwargs!
|
|
72
|
+
products = await test_agent.simple.get_products(
|
|
73
|
+
brief='Coffee subscription service for busy professionals'
|
|
78
74
|
)
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
print(f"Found {len(products.products)} products")
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Simple vs. Standard API
|
|
80
|
+
|
|
81
|
+
**Every ADCPClient** includes both API styles via the `.simple` accessor:
|
|
82
|
+
|
|
83
|
+
**Simple API** (`client.simple.*`) - Recommended for examples/prototyping:
|
|
84
|
+
```python
|
|
85
|
+
from adcp.testing import test_agent
|
|
86
|
+
|
|
87
|
+
# Kwargs and direct return - raises on error
|
|
88
|
+
products = await test_agent.simple.get_products(brief='Coffee brands')
|
|
89
|
+
print(products.products[0].name)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Standard API** (`client.*`) - Recommended for production:
|
|
93
|
+
```python
|
|
94
|
+
from adcp.testing import test_agent
|
|
95
|
+
from adcp.types.generated import GetProductsRequest
|
|
96
|
+
|
|
97
|
+
# Explicit request objects and TaskResult wrapper
|
|
98
|
+
request = GetProductsRequest(brief='Coffee brands')
|
|
99
|
+
result = await test_agent.get_products(request)
|
|
100
|
+
|
|
101
|
+
if result.success and result.data:
|
|
102
|
+
print(result.data.products[0].name)
|
|
103
|
+
else:
|
|
104
|
+
print(f"Error: {result.error}")
|
|
82
105
|
```
|
|
83
106
|
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
107
|
+
**When to use which:**
|
|
108
|
+
- **Simple API** (`.simple`): Quick testing, documentation, examples, notebooks
|
|
109
|
+
- **Standard API**: Production code, complex error handling, webhook workflows
|
|
110
|
+
|
|
111
|
+
### Available Test Helpers
|
|
112
|
+
|
|
113
|
+
Pre-configured agents (all include `.simple` accessor):
|
|
114
|
+
- **`test_agent`**: MCP test agent with authentication
|
|
115
|
+
- **`test_agent_a2a`**: A2A test agent with authentication
|
|
116
|
+
- **`test_agent_no_auth`**: MCP test agent without authentication
|
|
117
|
+
- **`test_agent_a2a_no_auth`**: A2A test agent without authentication
|
|
89
118
|
- **`creative_agent`**: Reference creative agent for preview functionality
|
|
90
119
|
- **`test_agent_client`**: Multi-agent client with both protocols
|
|
91
|
-
- **`create_test_agent()`**: Factory for custom test configurations
|
|
92
120
|
|
|
93
121
|
> **Note**: Test agents are rate-limited and for testing/examples only. DO NOT use in production.
|
|
94
122
|
|
|
95
|
-
See [examples/
|
|
123
|
+
See [examples/simple_api_demo.py](examples/simple_api_demo.py) for a complete comparison.
|
|
96
124
|
|
|
97
125
|
## Quick Start: Distributed Operations
|
|
98
126
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
adcp/__init__.py,sha256=
|
|
1
|
+
adcp/__init__.py,sha256=Zrkvf-Gcm4spEJLCwByHWqhydkD-OkkaW-pw7yjOQ4c,6976
|
|
2
2
|
adcp/__main__.py,sha256=Avy_C71rruh2lOuojvuXDj09tkFOaek74nJ-dbx25Sw,12838
|
|
3
|
-
adcp/client.py,sha256=
|
|
3
|
+
adcp/client.py,sha256=4qoFNDT5swzi4w5bnWJ5nVTG5JIL0xnLJOJMGeMyci4,28412
|
|
4
4
|
adcp/config.py,sha256=Vsy7ZPOI8G3fB_i5Nk-CHbC7wdasCUWuKlos0fwA0kY,2017
|
|
5
|
-
adcp/exceptions.py,sha256=
|
|
5
|
+
adcp/exceptions.py,sha256=9L7a3TKrMhmbEqDM0Qjdu3dQAFeKCSW4nc1IcLGSj4Y,5597
|
|
6
|
+
adcp/simple.py,sha256=FgPYWT32BNXkQz07r2x2gXgOmOikWLi88SzN5UIVSiU,10440
|
|
6
7
|
adcp/protocols/__init__.py,sha256=6UFwACQ0QadBUzy17wUROHqsJDp8ztPW2jzyl53Zh_g,262
|
|
7
8
|
adcp/protocols/a2a.py,sha256=FHgc6G_eU2qD0vH7_RyS1eZvUFSb2j3-EsceoHPi384,12467
|
|
8
9
|
adcp/protocols/base.py,sha256=vBHD23Fzl_CCk_Gy9nvSbBYopcJlYkYyzoz-rhI8wHg,5214
|
|
9
10
|
adcp/protocols/mcp.py,sha256=eIk8snCinZm-ZjdarGVMt5nEYJ4_8POM9Fa5Mkw7xxU,15902
|
|
10
|
-
adcp/testing/__init__.py,sha256=
|
|
11
|
+
adcp/testing/__init__.py,sha256=ZWp_floWjVZfy8RBG5v_FUXQ8YbN7xjXvVcX-_zl_HU,1416
|
|
11
12
|
adcp/testing/test_helpers.py,sha256=4n8fZYy1cVpjZpFW2SxBzpC8fmY-MBFrzY4tIPqe4rQ,10028
|
|
12
13
|
adcp/types/__init__.py,sha256=3E_TJUXqQQFcjmSZZSPLwqBP3s_ijsH2LDeuOU-MP30,402
|
|
13
14
|
adcp/types/core.py,sha256=RXkKCWCXS9BVJTNpe3Opm5O1I_LaQPMUuVwa-ipvS1Q,4839
|
|
@@ -17,9 +18,9 @@ adcp/utils/__init__.py,sha256=uetvSJB19CjQbtwEYZiTnumJG11GsafQmXm5eR3hL7E,153
|
|
|
17
18
|
adcp/utils/operation_id.py,sha256=wQX9Bb5epXzRq23xoeYPTqzu5yLuhshg7lKJZihcM2k,294
|
|
18
19
|
adcp/utils/preview_cache.py,sha256=8_2qs5CgrHv1_WOnD4bs43VWueu-rcZRu5PZMQ_lyuE,17573
|
|
19
20
|
adcp/utils/response_parser.py,sha256=uPk2vIH-RYZmq7y3i8lC4HTMQ3FfKdlgXKTjgJ1955M,6253
|
|
20
|
-
adcp-1.
|
|
21
|
-
adcp-1.
|
|
22
|
-
adcp-1.
|
|
23
|
-
adcp-1.
|
|
24
|
-
adcp-1.
|
|
25
|
-
adcp-1.
|
|
21
|
+
adcp-1.4.0.dist-info/licenses/LICENSE,sha256=PF39NR3Ae8PLgBhg3Uxw6ju7iGVIf8hfv9LRWQdii_U,629
|
|
22
|
+
adcp-1.4.0.dist-info/METADATA,sha256=AU6CN99ddoJk4iyZ3iHHVoeoYqAof3UzedzDrHpQji0,19931
|
|
23
|
+
adcp-1.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
adcp-1.4.0.dist-info/entry_points.txt,sha256=DQKpcGsJX8DtVI_SGApQ7tNvqUB4zkTLaTAEpFgmi3U,44
|
|
25
|
+
adcp-1.4.0.dist-info/top_level.txt,sha256=T1_NF0GefncFU9v_k56oDwKSJREyCqIM8lAwNZf0EOs,5
|
|
26
|
+
adcp-1.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|