adcp 2.0.0__tar.gz → 2.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.
- {adcp-2.0.0/src/adcp.egg-info → adcp-2.1.0}/PKG-INFO +40 -3
- {adcp-2.0.0 → adcp-2.1.0}/README.md +39 -2
- {adcp-2.0.0 → adcp-2.1.0}/pyproject.toml +4 -1
- adcp-2.1.0/src/adcp/__init__.py +243 -0
- adcp-2.1.0/src/adcp/py.typed +0 -0
- adcp-2.1.0/src/adcp/types/aliases.py +209 -0
- {adcp-2.0.0 → adcp-2.1.0/src/adcp.egg-info}/PKG-INFO +40 -3
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp.egg-info/SOURCES.txt +4 -1
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_discriminated_unions.py +30 -24
- adcp-2.1.0/tests/test_type_aliases.py +179 -0
- adcp-2.0.0/src/adcp/__init__.py +0 -120
- {adcp-2.0.0 → adcp-2.1.0}/LICENSE +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/setup.cfg +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/__main__.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/adagents.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/client.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/config.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/exceptions.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/protocols/__init__.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/protocols/a2a.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/protocols/base.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/protocols/mcp.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/simple.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/testing/__init__.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/testing/test_helpers.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/__init__.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/base.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/core.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/__init__.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/activate_signal_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/activate_signal_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/activation_key.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/adagents.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/asset_type.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/audio_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/brand_manifest.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/brand_manifest_ref.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/build_creative_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/build_creative_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/channels.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/cpc_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/cpcv_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/cpm_auction_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/cpm_fixed_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/cpp_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/cpv_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/create_media_buy_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/create_media_buy_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/creative_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/creative_assignment.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/creative_manifest.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/creative_policy.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/creative_status.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/css_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/daast_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/delivery_metrics.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/delivery_type.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/deployment.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/destination.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/error.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/flat_rate_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/format.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/format_id.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/frequency_cap.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/frequency_cap_scope.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/get_media_buy_delivery_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/get_media_buy_delivery_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/get_products_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/get_products_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/get_signals_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/get_signals_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/html_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/identifier_types.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/image_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/index.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/javascript_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/list_authorized_properties_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/list_authorized_properties_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/list_creative_formats_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/list_creative_formats_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/list_creatives_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/list_creatives_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/markdown_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/measurement.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/media_buy.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/media_buy_status.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/pacing.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/package.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/package_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/package_status.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/performance_feedback.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/placement.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/preview_creative_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/preview_creative_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/preview_render.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/pricing_model.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/pricing_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/product.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/promoted_offerings.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/promoted_products.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/property.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/protocol_envelope.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/provide_performance_feedback_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/provide_performance_feedback_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/publisher_identifier_types.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/push_notification_config.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/reporting_capabilities.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/standard_format_ids.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/start_timing.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/sub_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/sync_creatives_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/sync_creatives_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/targeting.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/task_status.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/task_type.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/tasks_get_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/tasks_get_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/tasks_list_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/tasks_list_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/text_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/update_media_buy_request.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/update_media_buy_response.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/url_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/vast_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/vcpm_auction_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/vcpm_fixed_option.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/video_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/webhook_asset.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/types/generated_poc/webhook_payload.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/utils/__init__.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/utils/operation_id.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/utils/preview_cache.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/utils/response_parser.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp/validation.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp.egg-info/dependency_links.txt +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp.egg-info/entry_points.txt +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp.egg-info/requires.txt +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/src/adcp.egg-info/top_level.txt +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_adagents.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_cli.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_client.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_code_generation.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_format_id_validation.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_helpers.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_preview_html.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_protocols.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_response_parser.py +0 -0
- {adcp-2.0.0 → adcp-2.1.0}/tests/test_simple_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adcp
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.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
|
|
@@ -94,7 +94,7 @@ print(products.products[0].name)
|
|
|
94
94
|
**Standard API** (`client.*`) - Recommended for production:
|
|
95
95
|
```python
|
|
96
96
|
from adcp.testing import test_agent
|
|
97
|
-
from adcp
|
|
97
|
+
from adcp import GetProductsRequest
|
|
98
98
|
|
|
99
99
|
# Explicit request objects and TaskResult wrapper
|
|
100
100
|
request = GetProductsRequest(brief='Coffee brands')
|
|
@@ -124,6 +124,8 @@ Pre-configured agents (all include `.simple` accessor):
|
|
|
124
124
|
|
|
125
125
|
See [examples/simple_api_demo.py](examples/simple_api_demo.py) for a complete comparison.
|
|
126
126
|
|
|
127
|
+
> **Tip**: Import types from the main `adcp` package (e.g., `from adcp import GetProductsRequest`) rather than `adcp.types.generated` for better API stability.
|
|
128
|
+
|
|
127
129
|
## Quick Start: Distributed Operations
|
|
128
130
|
|
|
129
131
|
For production use, configure your own agents:
|
|
@@ -187,7 +189,7 @@ from adcp.testing import (
|
|
|
187
189
|
test_agent_no_auth, test_agent_a2a_no_auth,
|
|
188
190
|
creative_agent, test_agent_client, create_test_agent
|
|
189
191
|
)
|
|
190
|
-
from adcp
|
|
192
|
+
from adcp import GetProductsRequest, PreviewCreativeRequest
|
|
191
193
|
|
|
192
194
|
# 1. Single agent with authentication (MCP)
|
|
193
195
|
result = await test_agent.get_products(
|
|
@@ -243,6 +245,7 @@ client = ADCPClient(config)
|
|
|
243
245
|
- **Auto-detection**: Automatically detect which protocol an agent uses
|
|
244
246
|
|
|
245
247
|
### Type Safety
|
|
248
|
+
|
|
246
249
|
Full type hints with Pydantic validation and auto-generated types from the AdCP spec:
|
|
247
250
|
|
|
248
251
|
```python
|
|
@@ -258,6 +261,40 @@ if result.success:
|
|
|
258
261
|
print(product.name, product.pricing_options) # Full IDE autocomplete!
|
|
259
262
|
```
|
|
260
263
|
|
|
264
|
+
#### Semantic Type Aliases
|
|
265
|
+
|
|
266
|
+
For discriminated union types (success/error responses), use semantic aliases for clearer code:
|
|
267
|
+
|
|
268
|
+
```python
|
|
269
|
+
from adcp import (
|
|
270
|
+
CreateMediaBuySuccessResponse, # Clear: this is the success case
|
|
271
|
+
CreateMediaBuyErrorResponse, # Clear: this is the error case
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
def handle_response(
|
|
275
|
+
response: CreateMediaBuySuccessResponse | CreateMediaBuyErrorResponse
|
|
276
|
+
) -> None:
|
|
277
|
+
if isinstance(response, CreateMediaBuySuccessResponse):
|
|
278
|
+
print(f"✅ Media buy created: {response.media_buy_id}")
|
|
279
|
+
else:
|
|
280
|
+
print(f"❌ Errors: {response.errors}")
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Available semantic aliases:**
|
|
284
|
+
- Response types: `*SuccessResponse` / `*ErrorResponse` (e.g., `CreateMediaBuySuccessResponse`)
|
|
285
|
+
- Request variants: `*FormatRequest` / `*ManifestRequest` (e.g., `PreviewCreativeFormatRequest`)
|
|
286
|
+
- Preview renders: `PreviewRenderImage` / `PreviewRenderHtml` / `PreviewRenderIframe`
|
|
287
|
+
- Activation keys: `PropertyIdActivationKey` / `PropertyTagActivationKey`
|
|
288
|
+
|
|
289
|
+
See `examples/type_aliases_demo.py` for more examples.
|
|
290
|
+
|
|
291
|
+
**Import guidelines:**
|
|
292
|
+
- ✅ **DO**: Import from main package: `from adcp import GetProductsRequest`
|
|
293
|
+
- ✅ **DO**: Use semantic aliases: `from adcp import CreateMediaBuySuccessResponse`
|
|
294
|
+
- ⚠️ **AVOID**: Import from internal modules: `from adcp.types.generated import CreateMediaBuyResponse1`
|
|
295
|
+
|
|
296
|
+
The main package exports provide a stable API while internal generated types may change.
|
|
297
|
+
|
|
261
298
|
### Multi-Agent Operations
|
|
262
299
|
Execute across multiple agents simultaneously:
|
|
263
300
|
|
|
@@ -55,7 +55,7 @@ print(products.products[0].name)
|
|
|
55
55
|
**Standard API** (`client.*`) - Recommended for production:
|
|
56
56
|
```python
|
|
57
57
|
from adcp.testing import test_agent
|
|
58
|
-
from adcp
|
|
58
|
+
from adcp import GetProductsRequest
|
|
59
59
|
|
|
60
60
|
# Explicit request objects and TaskResult wrapper
|
|
61
61
|
request = GetProductsRequest(brief='Coffee brands')
|
|
@@ -85,6 +85,8 @@ Pre-configured agents (all include `.simple` accessor):
|
|
|
85
85
|
|
|
86
86
|
See [examples/simple_api_demo.py](examples/simple_api_demo.py) for a complete comparison.
|
|
87
87
|
|
|
88
|
+
> **Tip**: Import types from the main `adcp` package (e.g., `from adcp import GetProductsRequest`) rather than `adcp.types.generated` for better API stability.
|
|
89
|
+
|
|
88
90
|
## Quick Start: Distributed Operations
|
|
89
91
|
|
|
90
92
|
For production use, configure your own agents:
|
|
@@ -148,7 +150,7 @@ from adcp.testing import (
|
|
|
148
150
|
test_agent_no_auth, test_agent_a2a_no_auth,
|
|
149
151
|
creative_agent, test_agent_client, create_test_agent
|
|
150
152
|
)
|
|
151
|
-
from adcp
|
|
153
|
+
from adcp import GetProductsRequest, PreviewCreativeRequest
|
|
152
154
|
|
|
153
155
|
# 1. Single agent with authentication (MCP)
|
|
154
156
|
result = await test_agent.get_products(
|
|
@@ -204,6 +206,7 @@ client = ADCPClient(config)
|
|
|
204
206
|
- **Auto-detection**: Automatically detect which protocol an agent uses
|
|
205
207
|
|
|
206
208
|
### Type Safety
|
|
209
|
+
|
|
207
210
|
Full type hints with Pydantic validation and auto-generated types from the AdCP spec:
|
|
208
211
|
|
|
209
212
|
```python
|
|
@@ -219,6 +222,40 @@ if result.success:
|
|
|
219
222
|
print(product.name, product.pricing_options) # Full IDE autocomplete!
|
|
220
223
|
```
|
|
221
224
|
|
|
225
|
+
#### Semantic Type Aliases
|
|
226
|
+
|
|
227
|
+
For discriminated union types (success/error responses), use semantic aliases for clearer code:
|
|
228
|
+
|
|
229
|
+
```python
|
|
230
|
+
from adcp import (
|
|
231
|
+
CreateMediaBuySuccessResponse, # Clear: this is the success case
|
|
232
|
+
CreateMediaBuyErrorResponse, # Clear: this is the error case
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
def handle_response(
|
|
236
|
+
response: CreateMediaBuySuccessResponse | CreateMediaBuyErrorResponse
|
|
237
|
+
) -> None:
|
|
238
|
+
if isinstance(response, CreateMediaBuySuccessResponse):
|
|
239
|
+
print(f"✅ Media buy created: {response.media_buy_id}")
|
|
240
|
+
else:
|
|
241
|
+
print(f"❌ Errors: {response.errors}")
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Available semantic aliases:**
|
|
245
|
+
- Response types: `*SuccessResponse` / `*ErrorResponse` (e.g., `CreateMediaBuySuccessResponse`)
|
|
246
|
+
- Request variants: `*FormatRequest` / `*ManifestRequest` (e.g., `PreviewCreativeFormatRequest`)
|
|
247
|
+
- Preview renders: `PreviewRenderImage` / `PreviewRenderHtml` / `PreviewRenderIframe`
|
|
248
|
+
- Activation keys: `PropertyIdActivationKey` / `PropertyTagActivationKey`
|
|
249
|
+
|
|
250
|
+
See `examples/type_aliases_demo.py` for more examples.
|
|
251
|
+
|
|
252
|
+
**Import guidelines:**
|
|
253
|
+
- ✅ **DO**: Import from main package: `from adcp import GetProductsRequest`
|
|
254
|
+
- ✅ **DO**: Use semantic aliases: `from adcp import CreateMediaBuySuccessResponse`
|
|
255
|
+
- ⚠️ **AVOID**: Import from internal modules: `from adcp.types.generated import CreateMediaBuyResponse1`
|
|
256
|
+
|
|
257
|
+
The main package exports provide a stable API while internal generated types may change.
|
|
258
|
+
|
|
222
259
|
### Multi-Agent Operations
|
|
223
260
|
Execute across multiple agents simultaneously:
|
|
224
261
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "adcp"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.1.0"
|
|
8
8
|
description = "Official Python client for the Ad Context Protocol (AdCP)"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "AdCP Community", email = "maintainers@adcontextprotocol.org"}
|
|
@@ -57,6 +57,9 @@ Issues = "https://github.com/adcontextprotocol/adcp-client-python/issues"
|
|
|
57
57
|
[tool.setuptools.packages.find]
|
|
58
58
|
where = ["src"]
|
|
59
59
|
|
|
60
|
+
[tool.setuptools.package-data]
|
|
61
|
+
adcp = ["py.typed"]
|
|
62
|
+
|
|
60
63
|
[tool.black]
|
|
61
64
|
line-length = 100
|
|
62
65
|
target-version = ["py310", "py311", "py312"]
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
AdCP Python Client Library
|
|
5
|
+
|
|
6
|
+
Official Python client for the Ad Context Protocol (AdCP).
|
|
7
|
+
Supports both A2A and MCP protocols with full type safety.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from adcp.adagents import (
|
|
11
|
+
domain_matches,
|
|
12
|
+
fetch_adagents,
|
|
13
|
+
get_all_properties,
|
|
14
|
+
get_all_tags,
|
|
15
|
+
get_properties_by_agent,
|
|
16
|
+
identifiers_match,
|
|
17
|
+
verify_agent_authorization,
|
|
18
|
+
verify_agent_for_property,
|
|
19
|
+
)
|
|
20
|
+
from adcp.client import ADCPClient, ADCPMultiAgentClient
|
|
21
|
+
from adcp.exceptions import (
|
|
22
|
+
AdagentsNotFoundError,
|
|
23
|
+
AdagentsTimeoutError,
|
|
24
|
+
AdagentsValidationError,
|
|
25
|
+
ADCPAuthenticationError,
|
|
26
|
+
ADCPConnectionError,
|
|
27
|
+
ADCPError,
|
|
28
|
+
ADCPProtocolError,
|
|
29
|
+
ADCPTimeoutError,
|
|
30
|
+
ADCPToolNotFoundError,
|
|
31
|
+
ADCPWebhookError,
|
|
32
|
+
ADCPWebhookSignatureError,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# Test helpers
|
|
36
|
+
from adcp.testing import (
|
|
37
|
+
CREATIVE_AGENT_CONFIG,
|
|
38
|
+
TEST_AGENT_A2A_CONFIG,
|
|
39
|
+
TEST_AGENT_A2A_NO_AUTH_CONFIG,
|
|
40
|
+
TEST_AGENT_MCP_CONFIG,
|
|
41
|
+
TEST_AGENT_MCP_NO_AUTH_CONFIG,
|
|
42
|
+
TEST_AGENT_TOKEN,
|
|
43
|
+
create_test_agent,
|
|
44
|
+
creative_agent,
|
|
45
|
+
test_agent,
|
|
46
|
+
test_agent_a2a,
|
|
47
|
+
test_agent_a2a_no_auth,
|
|
48
|
+
test_agent_client,
|
|
49
|
+
test_agent_no_auth,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# Import all generated types - users can import what they need from adcp.types.generated
|
|
53
|
+
from adcp.types import aliases, generated
|
|
54
|
+
|
|
55
|
+
# Re-export semantic type aliases for better ergonomics
|
|
56
|
+
from adcp.types.aliases import (
|
|
57
|
+
ActivateSignalErrorResponse,
|
|
58
|
+
ActivateSignalSuccessResponse,
|
|
59
|
+
BuildCreativeErrorResponse,
|
|
60
|
+
BuildCreativeSuccessResponse,
|
|
61
|
+
CreateMediaBuyErrorResponse,
|
|
62
|
+
CreateMediaBuySuccessResponse,
|
|
63
|
+
PreviewCreativeFormatRequest,
|
|
64
|
+
PreviewCreativeInteractiveResponse,
|
|
65
|
+
PreviewCreativeManifestRequest,
|
|
66
|
+
PreviewCreativeStaticResponse,
|
|
67
|
+
PreviewRenderHtml,
|
|
68
|
+
PreviewRenderIframe,
|
|
69
|
+
PreviewRenderImage,
|
|
70
|
+
PropertyIdActivationKey,
|
|
71
|
+
PropertyTagActivationKey,
|
|
72
|
+
ProvidePerformanceFeedbackErrorResponse,
|
|
73
|
+
ProvidePerformanceFeedbackSuccessResponse,
|
|
74
|
+
SyncCreativesErrorResponse,
|
|
75
|
+
SyncCreativesSuccessResponse,
|
|
76
|
+
UpdateMediaBuyErrorResponse,
|
|
77
|
+
UpdateMediaBuyPackagesRequest,
|
|
78
|
+
UpdateMediaBuyPropertiesRequest,
|
|
79
|
+
UpdateMediaBuySuccessResponse,
|
|
80
|
+
)
|
|
81
|
+
from adcp.types.core import AgentConfig, Protocol, TaskResult, TaskStatus, WebhookMetadata
|
|
82
|
+
|
|
83
|
+
# Re-export commonly-used request/response types for convenience
|
|
84
|
+
# Users should import from main package (e.g., `from adcp import GetProductsRequest`)
|
|
85
|
+
# rather than internal modules for better API stability
|
|
86
|
+
from adcp.types.generated import (
|
|
87
|
+
# Audience & Targeting
|
|
88
|
+
ActivateSignalRequest,
|
|
89
|
+
ActivateSignalResponse,
|
|
90
|
+
# Creative Operations
|
|
91
|
+
BuildCreativeRequest,
|
|
92
|
+
BuildCreativeResponse,
|
|
93
|
+
# Media Buy Operations
|
|
94
|
+
CreateMediaBuyRequest,
|
|
95
|
+
CreateMediaBuyResponse,
|
|
96
|
+
# Common data types
|
|
97
|
+
Error,
|
|
98
|
+
Format,
|
|
99
|
+
GetMediaBuyDeliveryRequest,
|
|
100
|
+
GetMediaBuyDeliveryResponse,
|
|
101
|
+
GetProductsRequest,
|
|
102
|
+
GetProductsResponse,
|
|
103
|
+
GetSignalsRequest,
|
|
104
|
+
GetSignalsResponse,
|
|
105
|
+
ListAuthorizedPropertiesRequest,
|
|
106
|
+
ListAuthorizedPropertiesResponse,
|
|
107
|
+
ListCreativeFormatsRequest,
|
|
108
|
+
ListCreativeFormatsResponse,
|
|
109
|
+
ListCreativesRequest,
|
|
110
|
+
ListCreativesResponse,
|
|
111
|
+
PreviewCreativeRequest,
|
|
112
|
+
PreviewCreativeResponse,
|
|
113
|
+
Product,
|
|
114
|
+
Property,
|
|
115
|
+
ProvidePerformanceFeedbackRequest,
|
|
116
|
+
ProvidePerformanceFeedbackResponse,
|
|
117
|
+
SyncCreativesRequest,
|
|
118
|
+
SyncCreativesResponse,
|
|
119
|
+
UpdateMediaBuyRequest,
|
|
120
|
+
UpdateMediaBuyResponse,
|
|
121
|
+
)
|
|
122
|
+
from adcp.types.generated import TaskStatus as GeneratedTaskStatus
|
|
123
|
+
from adcp.validation import (
|
|
124
|
+
ValidationError,
|
|
125
|
+
validate_adagents,
|
|
126
|
+
validate_agent_authorization,
|
|
127
|
+
validate_product,
|
|
128
|
+
validate_publisher_properties_item,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
__version__ = "2.1.0"
|
|
132
|
+
|
|
133
|
+
__all__ = [
|
|
134
|
+
# Client classes
|
|
135
|
+
"ADCPClient",
|
|
136
|
+
"ADCPMultiAgentClient",
|
|
137
|
+
# Core types
|
|
138
|
+
"AgentConfig",
|
|
139
|
+
"Protocol",
|
|
140
|
+
"TaskResult",
|
|
141
|
+
"TaskStatus",
|
|
142
|
+
"WebhookMetadata",
|
|
143
|
+
# Common request/response types (re-exported for convenience)
|
|
144
|
+
"CreateMediaBuyRequest",
|
|
145
|
+
"CreateMediaBuyResponse",
|
|
146
|
+
"GetMediaBuyDeliveryRequest",
|
|
147
|
+
"GetMediaBuyDeliveryResponse",
|
|
148
|
+
"GetProductsRequest",
|
|
149
|
+
"GetProductsResponse",
|
|
150
|
+
"UpdateMediaBuyRequest",
|
|
151
|
+
"UpdateMediaBuyResponse",
|
|
152
|
+
"BuildCreativeRequest",
|
|
153
|
+
"BuildCreativeResponse",
|
|
154
|
+
"ListCreativeFormatsRequest",
|
|
155
|
+
"ListCreativeFormatsResponse",
|
|
156
|
+
"ListCreativesRequest",
|
|
157
|
+
"ListCreativesResponse",
|
|
158
|
+
"PreviewCreativeRequest",
|
|
159
|
+
"PreviewCreativeResponse",
|
|
160
|
+
"SyncCreativesRequest",
|
|
161
|
+
"SyncCreativesResponse",
|
|
162
|
+
"ActivateSignalRequest",
|
|
163
|
+
"ActivateSignalResponse",
|
|
164
|
+
"GetSignalsRequest",
|
|
165
|
+
"GetSignalsResponse",
|
|
166
|
+
"ListAuthorizedPropertiesRequest",
|
|
167
|
+
"ListAuthorizedPropertiesResponse",
|
|
168
|
+
"ProvidePerformanceFeedbackRequest",
|
|
169
|
+
"ProvidePerformanceFeedbackResponse",
|
|
170
|
+
"Error",
|
|
171
|
+
"Format",
|
|
172
|
+
"Product",
|
|
173
|
+
"Property",
|
|
174
|
+
# Adagents validation
|
|
175
|
+
"fetch_adagents",
|
|
176
|
+
"verify_agent_authorization",
|
|
177
|
+
"verify_agent_for_property",
|
|
178
|
+
"domain_matches",
|
|
179
|
+
"identifiers_match",
|
|
180
|
+
"get_all_properties",
|
|
181
|
+
"get_all_tags",
|
|
182
|
+
"get_properties_by_agent",
|
|
183
|
+
# Test helpers
|
|
184
|
+
"test_agent",
|
|
185
|
+
"test_agent_a2a",
|
|
186
|
+
"test_agent_no_auth",
|
|
187
|
+
"test_agent_a2a_no_auth",
|
|
188
|
+
"creative_agent",
|
|
189
|
+
"test_agent_client",
|
|
190
|
+
"create_test_agent",
|
|
191
|
+
"TEST_AGENT_TOKEN",
|
|
192
|
+
"TEST_AGENT_MCP_CONFIG",
|
|
193
|
+
"TEST_AGENT_A2A_CONFIG",
|
|
194
|
+
"TEST_AGENT_MCP_NO_AUTH_CONFIG",
|
|
195
|
+
"TEST_AGENT_A2A_NO_AUTH_CONFIG",
|
|
196
|
+
"CREATIVE_AGENT_CONFIG",
|
|
197
|
+
# Exceptions
|
|
198
|
+
"ADCPError",
|
|
199
|
+
"ADCPConnectionError",
|
|
200
|
+
"ADCPAuthenticationError",
|
|
201
|
+
"ADCPTimeoutError",
|
|
202
|
+
"ADCPProtocolError",
|
|
203
|
+
"ADCPToolNotFoundError",
|
|
204
|
+
"ADCPWebhookError",
|
|
205
|
+
"ADCPWebhookSignatureError",
|
|
206
|
+
"AdagentsValidationError",
|
|
207
|
+
"AdagentsNotFoundError",
|
|
208
|
+
"AdagentsTimeoutError",
|
|
209
|
+
# Validation utilities
|
|
210
|
+
"ValidationError",
|
|
211
|
+
"validate_adagents",
|
|
212
|
+
"validate_agent_authorization",
|
|
213
|
+
"validate_product",
|
|
214
|
+
"validate_publisher_properties_item",
|
|
215
|
+
# Generated types modules
|
|
216
|
+
"generated",
|
|
217
|
+
"aliases",
|
|
218
|
+
"GeneratedTaskStatus",
|
|
219
|
+
# Semantic type aliases (for better API ergonomics)
|
|
220
|
+
"ActivateSignalSuccessResponse",
|
|
221
|
+
"ActivateSignalErrorResponse",
|
|
222
|
+
"BuildCreativeSuccessResponse",
|
|
223
|
+
"BuildCreativeErrorResponse",
|
|
224
|
+
"CreateMediaBuySuccessResponse",
|
|
225
|
+
"CreateMediaBuyErrorResponse",
|
|
226
|
+
"ProvidePerformanceFeedbackSuccessResponse",
|
|
227
|
+
"ProvidePerformanceFeedbackErrorResponse",
|
|
228
|
+
"SyncCreativesSuccessResponse",
|
|
229
|
+
"SyncCreativesErrorResponse",
|
|
230
|
+
"UpdateMediaBuySuccessResponse",
|
|
231
|
+
"UpdateMediaBuyErrorResponse",
|
|
232
|
+
"PreviewCreativeFormatRequest",
|
|
233
|
+
"PreviewCreativeManifestRequest",
|
|
234
|
+
"PreviewCreativeStaticResponse",
|
|
235
|
+
"PreviewCreativeInteractiveResponse",
|
|
236
|
+
"PreviewRenderImage",
|
|
237
|
+
"PreviewRenderHtml",
|
|
238
|
+
"PreviewRenderIframe",
|
|
239
|
+
"PropertyIdActivationKey",
|
|
240
|
+
"PropertyTagActivationKey",
|
|
241
|
+
"UpdateMediaBuyPackagesRequest",
|
|
242
|
+
"UpdateMediaBuyPropertiesRequest",
|
|
243
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"""Semantic type aliases for generated AdCP types.
|
|
2
|
+
|
|
3
|
+
This module provides user-friendly aliases for generated types where the
|
|
4
|
+
auto-generated names don't match user expectations from reading the spec.
|
|
5
|
+
|
|
6
|
+
The code generator (datamodel-code-generator) creates numbered suffixes for
|
|
7
|
+
discriminated union variants (e.g., Response1, Response2), but users expect
|
|
8
|
+
semantic names (e.g., SuccessResponse, ErrorResponse).
|
|
9
|
+
|
|
10
|
+
Categories of aliases:
|
|
11
|
+
|
|
12
|
+
1. Discriminated Union Response Variants
|
|
13
|
+
- Success/Error cases for API responses
|
|
14
|
+
- Named to match the semantic meaning from the spec
|
|
15
|
+
|
|
16
|
+
2. Preview/Render Types
|
|
17
|
+
- Input/Output/Request/Response variants
|
|
18
|
+
- Numbered types mapped to their semantic purpose
|
|
19
|
+
|
|
20
|
+
3. Activation Keys
|
|
21
|
+
- Signal activation key variants
|
|
22
|
+
|
|
23
|
+
DO NOT EDIT the generated types directly - they are regenerated from schemas.
|
|
24
|
+
Add aliases here for any types where the generated name is unclear.
|
|
25
|
+
|
|
26
|
+
Validation:
|
|
27
|
+
This module will raise ImportError at import time if any of the referenced
|
|
28
|
+
generated types do not exist. This ensures that schema changes are caught
|
|
29
|
+
immediately rather than at runtime when users try to use the aliases.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
from __future__ import annotations
|
|
33
|
+
|
|
34
|
+
# Import all generated types that need semantic aliases
|
|
35
|
+
from adcp.types.generated import (
|
|
36
|
+
# Activation responses
|
|
37
|
+
ActivateSignalResponse1,
|
|
38
|
+
ActivateSignalResponse2,
|
|
39
|
+
# Activation keys
|
|
40
|
+
ActivationKey1,
|
|
41
|
+
ActivationKey2,
|
|
42
|
+
# Build creative responses
|
|
43
|
+
BuildCreativeResponse1,
|
|
44
|
+
BuildCreativeResponse2,
|
|
45
|
+
# Create media buy responses
|
|
46
|
+
CreateMediaBuyResponse1,
|
|
47
|
+
CreateMediaBuyResponse2,
|
|
48
|
+
# Preview creative requests
|
|
49
|
+
PreviewCreativeRequest1,
|
|
50
|
+
PreviewCreativeRequest2,
|
|
51
|
+
# Preview creative responses
|
|
52
|
+
PreviewCreativeResponse1,
|
|
53
|
+
PreviewCreativeResponse2,
|
|
54
|
+
# Preview renders
|
|
55
|
+
PreviewRender1,
|
|
56
|
+
PreviewRender2,
|
|
57
|
+
PreviewRender3,
|
|
58
|
+
# Performance feedback responses
|
|
59
|
+
ProvidePerformanceFeedbackResponse1,
|
|
60
|
+
ProvidePerformanceFeedbackResponse2,
|
|
61
|
+
# Sync creatives responses
|
|
62
|
+
SyncCreativesResponse1,
|
|
63
|
+
SyncCreativesResponse2,
|
|
64
|
+
# Update media buy requests
|
|
65
|
+
UpdateMediaBuyRequest1,
|
|
66
|
+
UpdateMediaBuyRequest2,
|
|
67
|
+
# Update media buy responses
|
|
68
|
+
UpdateMediaBuyResponse1,
|
|
69
|
+
UpdateMediaBuyResponse2,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# ============================================================================
|
|
73
|
+
# RESPONSE TYPE ALIASES - Success/Error Discriminated Unions
|
|
74
|
+
# ============================================================================
|
|
75
|
+
# These are atomic operations where the response is EITHER success OR error,
|
|
76
|
+
# never both. The numbered suffixes from the generator don't convey this
|
|
77
|
+
# critical semantic distinction.
|
|
78
|
+
|
|
79
|
+
# Activate Signal Response Variants
|
|
80
|
+
ActivateSignalSuccessResponse = ActivateSignalResponse1
|
|
81
|
+
"""Success response - signal activation succeeded."""
|
|
82
|
+
|
|
83
|
+
ActivateSignalErrorResponse = ActivateSignalResponse2
|
|
84
|
+
"""Error response - signal activation failed."""
|
|
85
|
+
|
|
86
|
+
# Build Creative Response Variants
|
|
87
|
+
BuildCreativeSuccessResponse = BuildCreativeResponse1
|
|
88
|
+
"""Success response - creative built successfully, manifest returned."""
|
|
89
|
+
|
|
90
|
+
BuildCreativeErrorResponse = BuildCreativeResponse2
|
|
91
|
+
"""Error response - creative build failed, no manifest created."""
|
|
92
|
+
|
|
93
|
+
# Create Media Buy Response Variants
|
|
94
|
+
CreateMediaBuySuccessResponse = CreateMediaBuyResponse1
|
|
95
|
+
"""Success response - media buy created successfully with media_buy_id."""
|
|
96
|
+
|
|
97
|
+
CreateMediaBuyErrorResponse = CreateMediaBuyResponse2
|
|
98
|
+
"""Error response - media buy creation failed, no media buy created."""
|
|
99
|
+
|
|
100
|
+
# Performance Feedback Response Variants
|
|
101
|
+
ProvidePerformanceFeedbackSuccessResponse = ProvidePerformanceFeedbackResponse1
|
|
102
|
+
"""Success response - performance feedback accepted."""
|
|
103
|
+
|
|
104
|
+
ProvidePerformanceFeedbackErrorResponse = ProvidePerformanceFeedbackResponse2
|
|
105
|
+
"""Error response - performance feedback rejected."""
|
|
106
|
+
|
|
107
|
+
# Sync Creatives Response Variants
|
|
108
|
+
SyncCreativesSuccessResponse = SyncCreativesResponse1
|
|
109
|
+
"""Success response - sync operation processed creatives."""
|
|
110
|
+
|
|
111
|
+
SyncCreativesErrorResponse = SyncCreativesResponse2
|
|
112
|
+
"""Error response - sync operation failed."""
|
|
113
|
+
|
|
114
|
+
# Update Media Buy Response Variants
|
|
115
|
+
UpdateMediaBuySuccessResponse = UpdateMediaBuyResponse1
|
|
116
|
+
"""Success response - media buy updated successfully."""
|
|
117
|
+
|
|
118
|
+
UpdateMediaBuyErrorResponse = UpdateMediaBuyResponse2
|
|
119
|
+
"""Error response - media buy update failed, no changes applied."""
|
|
120
|
+
|
|
121
|
+
# ============================================================================
|
|
122
|
+
# REQUEST TYPE ALIASES - Operation Variants
|
|
123
|
+
# ============================================================================
|
|
124
|
+
|
|
125
|
+
# Preview Creative Request Variants
|
|
126
|
+
PreviewCreativeFormatRequest = PreviewCreativeRequest1
|
|
127
|
+
"""Preview request using format_id to identify creative format."""
|
|
128
|
+
|
|
129
|
+
PreviewCreativeManifestRequest = PreviewCreativeRequest2
|
|
130
|
+
"""Preview request using creative_manifest_url to identify creative."""
|
|
131
|
+
|
|
132
|
+
# Update Media Buy Request Variants
|
|
133
|
+
UpdateMediaBuyPackagesRequest = UpdateMediaBuyRequest1
|
|
134
|
+
"""Update request modifying packages in the media buy."""
|
|
135
|
+
|
|
136
|
+
UpdateMediaBuyPropertiesRequest = UpdateMediaBuyRequest2
|
|
137
|
+
"""Update request modifying media buy properties (not packages)."""
|
|
138
|
+
|
|
139
|
+
# ============================================================================
|
|
140
|
+
# ACTIVATION KEY ALIASES
|
|
141
|
+
# ============================================================================
|
|
142
|
+
|
|
143
|
+
PropertyIdActivationKey = ActivationKey1
|
|
144
|
+
"""Activation key using property_id for identification."""
|
|
145
|
+
|
|
146
|
+
PropertyTagActivationKey = ActivationKey2
|
|
147
|
+
"""Activation key using property_tags for identification."""
|
|
148
|
+
|
|
149
|
+
# ============================================================================
|
|
150
|
+
# PREVIEW/RENDER TYPE ALIASES
|
|
151
|
+
# ============================================================================
|
|
152
|
+
|
|
153
|
+
# Preview Creative Response Variants
|
|
154
|
+
PreviewCreativeStaticResponse = PreviewCreativeResponse1
|
|
155
|
+
"""Preview response with static renders (image/HTML snapshots)."""
|
|
156
|
+
|
|
157
|
+
PreviewCreativeInteractiveResponse = PreviewCreativeResponse2
|
|
158
|
+
"""Preview response with interactive renders (iframe embedding)."""
|
|
159
|
+
|
|
160
|
+
# Preview Render Variants
|
|
161
|
+
PreviewRenderImage = PreviewRender1
|
|
162
|
+
"""Image-based preview render (PNG/JPEG)."""
|
|
163
|
+
|
|
164
|
+
PreviewRenderHtml = PreviewRender2
|
|
165
|
+
"""HTML-based preview render (static markup)."""
|
|
166
|
+
|
|
167
|
+
PreviewRenderIframe = PreviewRender3
|
|
168
|
+
"""Interactive iframe-based preview render."""
|
|
169
|
+
|
|
170
|
+
# ============================================================================
|
|
171
|
+
# EXPORTS
|
|
172
|
+
# ============================================================================
|
|
173
|
+
|
|
174
|
+
__all__ = [
|
|
175
|
+
# Activation responses
|
|
176
|
+
"ActivateSignalSuccessResponse",
|
|
177
|
+
"ActivateSignalErrorResponse",
|
|
178
|
+
# Activation keys
|
|
179
|
+
"PropertyIdActivationKey",
|
|
180
|
+
"PropertyTagActivationKey",
|
|
181
|
+
# Build creative responses
|
|
182
|
+
"BuildCreativeSuccessResponse",
|
|
183
|
+
"BuildCreativeErrorResponse",
|
|
184
|
+
# Create media buy responses
|
|
185
|
+
"CreateMediaBuySuccessResponse",
|
|
186
|
+
"CreateMediaBuyErrorResponse",
|
|
187
|
+
# Performance feedback responses
|
|
188
|
+
"ProvidePerformanceFeedbackSuccessResponse",
|
|
189
|
+
"ProvidePerformanceFeedbackErrorResponse",
|
|
190
|
+
# Preview creative requests
|
|
191
|
+
"PreviewCreativeFormatRequest",
|
|
192
|
+
"PreviewCreativeManifestRequest",
|
|
193
|
+
# Preview creative responses
|
|
194
|
+
"PreviewCreativeStaticResponse",
|
|
195
|
+
"PreviewCreativeInteractiveResponse",
|
|
196
|
+
# Preview renders
|
|
197
|
+
"PreviewRenderImage",
|
|
198
|
+
"PreviewRenderHtml",
|
|
199
|
+
"PreviewRenderIframe",
|
|
200
|
+
# Sync creatives responses
|
|
201
|
+
"SyncCreativesSuccessResponse",
|
|
202
|
+
"SyncCreativesErrorResponse",
|
|
203
|
+
# Update media buy requests
|
|
204
|
+
"UpdateMediaBuyPackagesRequest",
|
|
205
|
+
"UpdateMediaBuyPropertiesRequest",
|
|
206
|
+
# Update media buy responses
|
|
207
|
+
"UpdateMediaBuySuccessResponse",
|
|
208
|
+
"UpdateMediaBuyErrorResponse",
|
|
209
|
+
]
|