adcp 2.8.0__py3-none-any.whl → 2.9.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 +7 -4
- adcp/__main__.py +31 -3
- adcp/client.py +200 -0
- adcp/protocols/a2a.py +12 -0
- adcp/protocols/base.py +15 -0
- adcp/protocols/mcp.py +12 -0
- adcp/types/__init__.py +0 -19
- adcp/types/_generated.py +37 -38
- adcp/types/aliases.py +10 -43
- adcp/types/generated_poc/activate_signal_request.py +3 -3
- adcp/types/generated_poc/activate_signal_response.py +2 -2
- adcp/types/generated_poc/asset_content_type.py +23 -0
- adcp/types/generated_poc/brand_manifest.py +8 -8
- adcp/types/generated_poc/create_media_buy_response.py +16 -21
- adcp/types/generated_poc/deployment.py +6 -6
- adcp/types/generated_poc/destination.py +4 -4
- adcp/types/generated_poc/format.py +5 -30
- adcp/types/generated_poc/format_category.py +17 -0
- adcp/types/generated_poc/get_signals_request.py +4 -4
- adcp/types/generated_poc/get_signals_response.py +2 -2
- adcp/types/generated_poc/list_creative_formats_request.py +4 -22
- adcp/types/generated_poc/update_media_buy_response.py +15 -22
- adcp/types/stable.py +17 -22
- {adcp-2.8.0.dist-info → adcp-2.9.0.dist-info}/METADATA +172 -1
- {adcp-2.8.0.dist-info → adcp-2.9.0.dist-info}/RECORD +29 -28
- adcp/types/generated_poc/asset_type.py +0 -100
- {adcp-2.8.0.dist-info → adcp-2.9.0.dist-info}/WHEEL +0 -0
- {adcp-2.8.0.dist-info → adcp-2.9.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.8.0.dist-info → adcp-2.9.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.8.0.dist-info → adcp-2.9.0.dist-info}/top_level.txt +0 -0
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: list-creative-formats-request.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T11:58:34+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
-
from enum import Enum
|
|
8
7
|
from typing import Annotated, Any
|
|
9
8
|
|
|
10
9
|
from adcp.types.base import AdCPBaseModel
|
|
11
10
|
from pydantic import ConfigDict, Field
|
|
12
11
|
|
|
13
|
-
from . import format_id
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class AssetType(Enum):
|
|
17
|
-
image = 'image'
|
|
18
|
-
video = 'video'
|
|
19
|
-
audio = 'audio'
|
|
20
|
-
text = 'text'
|
|
21
|
-
html = 'html'
|
|
22
|
-
javascript = 'javascript'
|
|
23
|
-
url = 'url'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class Type(Enum):
|
|
27
|
-
audio = 'audio'
|
|
28
|
-
video = 'video'
|
|
29
|
-
display = 'display'
|
|
30
|
-
dooh = 'dooh'
|
|
12
|
+
from . import asset_content_type, format_category, format_id
|
|
31
13
|
|
|
32
14
|
|
|
33
15
|
class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
@@ -35,7 +17,7 @@ class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
|
35
17
|
extra='forbid',
|
|
36
18
|
)
|
|
37
19
|
asset_types: Annotated[
|
|
38
|
-
list[
|
|
20
|
+
list[asset_content_type.AssetContentType] | None,
|
|
39
21
|
Field(
|
|
40
22
|
description="Filter to formats that include these asset types. For third-party tags, search for 'html' or 'javascript'. E.g., ['image', 'text'] returns formats with images and text, ['javascript'] returns formats accepting JavaScript tags."
|
|
41
23
|
),
|
|
@@ -86,7 +68,7 @@ class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
|
86
68
|
str | None, Field(description='Search for formats by name (case-insensitive partial match)')
|
|
87
69
|
] = None
|
|
88
70
|
type: Annotated[
|
|
89
|
-
|
|
71
|
+
format_category.FormatCategory | None,
|
|
90
72
|
Field(
|
|
91
73
|
description='Filter by format type (technical categories with distinct requirements)'
|
|
92
74
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: update-media-buy-response.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T11:58:34+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -9,15 +9,23 @@ from typing import Annotated, Any
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
10
|
from pydantic import AwareDatetime, ConfigDict, Field, RootModel
|
|
11
11
|
|
|
12
|
-
from . import error
|
|
12
|
+
from . import error, package
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class UpdateMediaBuyResponse2(AdCPBaseModel):
|
|
16
16
|
model_config = ConfigDict(
|
|
17
17
|
extra='forbid',
|
|
18
18
|
)
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
context: Annotated[
|
|
20
|
+
dict[str, Any] | None,
|
|
21
|
+
Field(
|
|
22
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
23
|
+
),
|
|
24
|
+
] = None
|
|
25
|
+
errors: Annotated[
|
|
26
|
+
list[error.Error],
|
|
27
|
+
Field(description='Array of errors explaining why the operation failed', min_length=1),
|
|
28
|
+
]
|
|
21
29
|
|
|
22
30
|
|
|
23
31
|
class UpdateMediaBuyResponse1(AdCPBaseModel):
|
|
@@ -25,7 +33,8 @@ class UpdateMediaBuyResponse1(AdCPBaseModel):
|
|
|
25
33
|
extra='forbid',
|
|
26
34
|
)
|
|
27
35
|
affected_packages: Annotated[
|
|
28
|
-
list[
|
|
36
|
+
list[package.Package] | None,
|
|
37
|
+
Field(description='Array of packages that were modified with complete state information'),
|
|
29
38
|
] = None
|
|
30
39
|
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for the media buy")]
|
|
31
40
|
context: Annotated[
|
|
@@ -41,22 +50,6 @@ class UpdateMediaBuyResponse1(AdCPBaseModel):
|
|
|
41
50
|
media_buy_id: Annotated[str, Field(description="Publisher's identifier for the media buy")]
|
|
42
51
|
|
|
43
52
|
|
|
44
|
-
class UpdateMediaBuyResponse2(AdCPBaseModel):
|
|
45
|
-
model_config = ConfigDict(
|
|
46
|
-
extra='forbid',
|
|
47
|
-
)
|
|
48
|
-
context: Annotated[
|
|
49
|
-
dict[str, Any] | None,
|
|
50
|
-
Field(
|
|
51
|
-
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
52
|
-
),
|
|
53
|
-
] = None
|
|
54
|
-
errors: Annotated[
|
|
55
|
-
list[error.Error],
|
|
56
|
-
Field(description='Array of errors explaining why the operation failed', min_length=1),
|
|
57
|
-
]
|
|
58
|
-
|
|
59
|
-
|
|
60
53
|
class UpdateMediaBuyResponse(RootModel[UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2]):
|
|
61
54
|
root: Annotated[
|
|
62
55
|
UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2,
|
adcp/types/stable.py
CHANGED
|
@@ -26,14 +26,12 @@ from adcp.types._generated import (
|
|
|
26
26
|
# Core request/response types
|
|
27
27
|
ActivateSignalRequest,
|
|
28
28
|
ActivateSignalResponse,
|
|
29
|
-
AffectedPackage,
|
|
30
29
|
AggregatedTotals,
|
|
31
30
|
# Assets
|
|
32
31
|
Asset,
|
|
32
|
+
AssetContentType, # New from PR #222: consolidated asset content types
|
|
33
33
|
AssetSelectors,
|
|
34
34
|
AssetsRequired,
|
|
35
|
-
AssetType,
|
|
36
|
-
AssetTypeSchema,
|
|
37
35
|
AssignedPackage,
|
|
38
36
|
Assignments,
|
|
39
37
|
AudioAsset,
|
|
@@ -52,7 +50,6 @@ from adcp.types._generated import (
|
|
|
52
50
|
CoBranding,
|
|
53
51
|
Colors,
|
|
54
52
|
Contact,
|
|
55
|
-
ContentLength,
|
|
56
53
|
Country,
|
|
57
54
|
# Pricing options
|
|
58
55
|
CpcPricingOption,
|
|
@@ -79,25 +76,23 @@ from adcp.types._generated import (
|
|
|
79
76
|
DeliveryMetrics,
|
|
80
77
|
DeliveryType,
|
|
81
78
|
Details,
|
|
82
|
-
Dimensions,
|
|
83
79
|
Direction,
|
|
84
80
|
Disclaimer,
|
|
85
81
|
Domain,
|
|
86
82
|
DomainBreakdown,
|
|
87
83
|
DoohMetrics,
|
|
88
|
-
Duration,
|
|
89
84
|
Embedding,
|
|
90
85
|
Error,
|
|
91
86
|
FeedbackSource,
|
|
92
87
|
FeedFormat,
|
|
93
88
|
FieldModel,
|
|
94
|
-
FileSize,
|
|
95
89
|
Filters,
|
|
96
90
|
FlatRatePricingOption,
|
|
97
91
|
Fonts,
|
|
98
92
|
Format,
|
|
99
93
|
FormatCard,
|
|
100
94
|
FormatCardDetailed,
|
|
95
|
+
FormatCategory, # New from PR #222: format categories (display, video, native, etc.)
|
|
101
96
|
FormatId,
|
|
102
97
|
FormatType,
|
|
103
98
|
FrequencyCap,
|
|
@@ -171,7 +166,6 @@ from adcp.types._generated import (
|
|
|
171
166
|
PublisherDomain,
|
|
172
167
|
PublisherIdentifierTypes,
|
|
173
168
|
PushNotificationConfig,
|
|
174
|
-
Quality,
|
|
175
169
|
QuartileData,
|
|
176
170
|
QuerySummary,
|
|
177
171
|
Render,
|
|
@@ -181,7 +175,6 @@ from adcp.types._generated import (
|
|
|
181
175
|
ReportingWebhook,
|
|
182
176
|
Request,
|
|
183
177
|
RequestedMetric,
|
|
184
|
-
Requirements,
|
|
185
178
|
Response,
|
|
186
179
|
ResponseType,
|
|
187
180
|
Responsive,
|
|
@@ -229,10 +222,10 @@ from adcp.types._generated import (
|
|
|
229
222
|
WebhookAsset,
|
|
230
223
|
WebhookPayload,
|
|
231
224
|
)
|
|
232
|
-
|
|
233
|
-
#
|
|
234
|
-
|
|
235
|
-
|
|
225
|
+
from adcp.types._generated import (
|
|
226
|
+
# PR #223 unified responses, no more collision
|
|
227
|
+
_PackageFromPackage as Package,
|
|
228
|
+
)
|
|
236
229
|
|
|
237
230
|
# Note: BrandManifest is currently split into BrandManifest1/2 due to upstream schema
|
|
238
231
|
# using anyOf incorrectly. This will be fixed upstream to create a single BrandManifest type.
|
|
@@ -241,13 +234,17 @@ from adcp.types._generated import _PackageFromPackage as Package
|
|
|
241
234
|
# Note: BrandManifest is now a single clean type
|
|
242
235
|
# Re-export BrandManifest directly (no alias needed)
|
|
243
236
|
|
|
237
|
+
# Backward compatibility notes:
|
|
238
|
+
# - AssetType is maintained as an alias to AssetContentType for backward compatibility
|
|
239
|
+
# - Will be removed in 3.0.0
|
|
240
|
+
# - Package collision resolved by PR #223 (unified responses)
|
|
241
|
+
|
|
244
242
|
# Re-export all stable types
|
|
245
243
|
__all__ = [
|
|
246
244
|
# Request/Response types
|
|
247
245
|
"ActivateSignalRequest",
|
|
248
246
|
"ActivateSignalResponse",
|
|
249
247
|
"Action",
|
|
250
|
-
"AffectedPackage",
|
|
251
248
|
"AggregatedTotals",
|
|
252
249
|
"BuildCreativeRequest",
|
|
253
250
|
"BuildCreativeResponse",
|
|
@@ -295,8 +292,9 @@ __all__ = [
|
|
|
295
292
|
# Domain types
|
|
296
293
|
"Asset",
|
|
297
294
|
"AssetSelectors",
|
|
298
|
-
"
|
|
299
|
-
"
|
|
295
|
+
"AssetContentType", # New canonical name from PR #222
|
|
296
|
+
"AssetType", # Deprecated alias for AssetContentType
|
|
297
|
+
"FormatCategory", # New from PR #222
|
|
300
298
|
"AssetsRequired",
|
|
301
299
|
"AssignedPackage",
|
|
302
300
|
"Assignments",
|
|
@@ -371,18 +369,14 @@ __all__ = [
|
|
|
371
369
|
"VcpmFixedRatePricingOption",
|
|
372
370
|
# Status enums & simple types
|
|
373
371
|
"CatalogType",
|
|
374
|
-
"ContentLength",
|
|
375
372
|
"Country",
|
|
376
373
|
"CreativeStatus",
|
|
377
374
|
"DaastVersion",
|
|
378
375
|
"DeliverTo",
|
|
379
376
|
"DeliveryType",
|
|
380
|
-
"Dimensions",
|
|
381
377
|
"Direction",
|
|
382
|
-
"Duration",
|
|
383
378
|
"FeedbackSource",
|
|
384
379
|
"FieldModel",
|
|
385
|
-
"FileSize",
|
|
386
380
|
"FormatType",
|
|
387
381
|
"FrequencyCap",
|
|
388
382
|
"FrequencyCapScope",
|
|
@@ -405,7 +399,6 @@ __all__ = [
|
|
|
405
399
|
"PropertyType",
|
|
406
400
|
"PublisherDomain",
|
|
407
401
|
"PublisherIdentifierTypes",
|
|
408
|
-
"Quality",
|
|
409
402
|
"ResponseType",
|
|
410
403
|
"Responsive",
|
|
411
404
|
"SignalType",
|
|
@@ -436,7 +429,6 @@ __all__ = [
|
|
|
436
429
|
"ReportingPeriod",
|
|
437
430
|
"ReportingWebhook",
|
|
438
431
|
"RequestedMetric",
|
|
439
|
-
"Requirements",
|
|
440
432
|
"Scheme",
|
|
441
433
|
"Security",
|
|
442
434
|
# Assets
|
|
@@ -452,3 +444,6 @@ __all__ = [
|
|
|
452
444
|
"WebhookAsset",
|
|
453
445
|
"WebhookPayload",
|
|
454
446
|
]
|
|
447
|
+
|
|
448
|
+
# Deprecated aliases for backward compatibility - will be removed in 3.0.0
|
|
449
|
+
AssetType = AssetContentType # Use AssetContentType instead
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adcp
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.9.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
|
|
@@ -507,12 +507,183 @@ All AdCP tools with full type safety:
|
|
|
507
507
|
- `list_creatives()` - List creative assets
|
|
508
508
|
- `get_media_buy_delivery()` - Get delivery performance
|
|
509
509
|
|
|
510
|
+
**Creative Management:**
|
|
511
|
+
- `preview_creative()` - Preview creative before building
|
|
512
|
+
- `build_creative()` - Generate production-ready creative assets
|
|
513
|
+
|
|
510
514
|
**Audience & Targeting:**
|
|
511
515
|
- `list_authorized_properties()` - Get authorized properties
|
|
512
516
|
- `get_signals()` - Get audience signals
|
|
513
517
|
- `activate_signal()` - Activate audience signals
|
|
514
518
|
- `provide_performance_feedback()` - Send performance feedback
|
|
515
519
|
|
|
520
|
+
## Workflow Examples
|
|
521
|
+
|
|
522
|
+
### Complete Media Buy Workflow
|
|
523
|
+
|
|
524
|
+
A typical media buy workflow involves discovering products, creating the buy, and managing creatives:
|
|
525
|
+
|
|
526
|
+
```python
|
|
527
|
+
from adcp import ADCPClient, AgentConfig, GetProductsRequest, CreateMediaBuyRequest
|
|
528
|
+
from adcp import BrandManifest, PublisherPropertiesAll
|
|
529
|
+
|
|
530
|
+
# 1. Connect to agent
|
|
531
|
+
config = AgentConfig(id="sales_agent", agent_uri="https://...", protocol="mcp")
|
|
532
|
+
async with ADCPClient(config) as client:
|
|
533
|
+
|
|
534
|
+
# 2. Discover available products
|
|
535
|
+
products_result = await client.get_products(
|
|
536
|
+
GetProductsRequest(brief="Premium video inventory for coffee brand")
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
if products_result.success:
|
|
540
|
+
product = products_result.data.products[0]
|
|
541
|
+
print(f"Found product: {product.name}")
|
|
542
|
+
|
|
543
|
+
# 3. Create media buy reservation
|
|
544
|
+
media_buy_result = await client.create_media_buy(
|
|
545
|
+
CreateMediaBuyRequest(
|
|
546
|
+
brand_manifest=BrandManifest(
|
|
547
|
+
name="Coffee Co",
|
|
548
|
+
brand_url="https://coffeeco.com",
|
|
549
|
+
logo_url="https://coffeeco.com/logo.png",
|
|
550
|
+
# ... additional brand details
|
|
551
|
+
),
|
|
552
|
+
packages=[{
|
|
553
|
+
"package_id": product.packages[0].package_id,
|
|
554
|
+
"quantity": 1000000 # impressions
|
|
555
|
+
}],
|
|
556
|
+
publisher_properties=PublisherPropertiesAll(
|
|
557
|
+
selection_type="all" # Target all authorized properties
|
|
558
|
+
)
|
|
559
|
+
)
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
if media_buy_result.success:
|
|
563
|
+
media_buy_id = media_buy_result.data.media_buy_id
|
|
564
|
+
print(f"✅ Media buy created: {media_buy_id}")
|
|
565
|
+
|
|
566
|
+
# 4. Update media buy if needed
|
|
567
|
+
from adcp import UpdateMediaBuyPackagesRequest
|
|
568
|
+
|
|
569
|
+
update_result = await client.update_media_buy(
|
|
570
|
+
UpdateMediaBuyPackagesRequest(
|
|
571
|
+
media_buy_id=media_buy_id,
|
|
572
|
+
packages=[{
|
|
573
|
+
"package_id": product.packages[0].package_id,
|
|
574
|
+
"quantity": 1500000 # Increase budget
|
|
575
|
+
}]
|
|
576
|
+
)
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
if update_result.success:
|
|
580
|
+
print("✅ Media buy updated")
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### Complete Creative Workflow
|
|
584
|
+
|
|
585
|
+
Build and deliver production-ready creatives:
|
|
586
|
+
|
|
587
|
+
```python
|
|
588
|
+
from adcp import ADCPClient, AgentConfig
|
|
589
|
+
from adcp import PreviewCreativeFormatRequest, BuildCreativeRequest
|
|
590
|
+
from adcp import CreativeManifest, PlatformDeployment
|
|
591
|
+
|
|
592
|
+
# 1. Connect to creative agent
|
|
593
|
+
config = AgentConfig(id="creative_agent", agent_uri="https://...", protocol="mcp")
|
|
594
|
+
async with ADCPClient(config) as client:
|
|
595
|
+
|
|
596
|
+
# 2. List available formats
|
|
597
|
+
formats_result = await client.list_creative_formats()
|
|
598
|
+
|
|
599
|
+
if formats_result.success:
|
|
600
|
+
format_id = formats_result.data.formats[0].format_id
|
|
601
|
+
print(f"Using format: {format_id.id}")
|
|
602
|
+
|
|
603
|
+
# 3. Preview creative (test before building)
|
|
604
|
+
preview_result = await client.preview_creative(
|
|
605
|
+
PreviewCreativeFormatRequest(
|
|
606
|
+
target_format_id=format_id.id,
|
|
607
|
+
inputs={
|
|
608
|
+
"headline": "Fresh Coffee Daily",
|
|
609
|
+
"cta": "Order Now"
|
|
610
|
+
},
|
|
611
|
+
output_format="url" # Get preview URL
|
|
612
|
+
)
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
if preview_result.success:
|
|
616
|
+
preview_url = preview_result.data.renders[0].url
|
|
617
|
+
print(f"Preview at: {preview_url}")
|
|
618
|
+
|
|
619
|
+
# 4. Build production creative
|
|
620
|
+
build_result = await client.build_creative(
|
|
621
|
+
BuildCreativeRequest(
|
|
622
|
+
manifest=CreativeManifest(
|
|
623
|
+
format_id=format_id,
|
|
624
|
+
brand_url="https://coffeeco.com",
|
|
625
|
+
# ... creative content
|
|
626
|
+
),
|
|
627
|
+
target_format_id=format_id.id,
|
|
628
|
+
deployment=PlatformDeployment(
|
|
629
|
+
type="platform",
|
|
630
|
+
platform_id="google_admanager"
|
|
631
|
+
)
|
|
632
|
+
)
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
if build_result.success:
|
|
636
|
+
vast_url = build_result.data.assets[0].url
|
|
637
|
+
print(f"✅ Creative ready: {vast_url}")
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
### Integrated Workflow: Media Buy + Creatives
|
|
641
|
+
|
|
642
|
+
Combine both workflows for a complete campaign setup:
|
|
643
|
+
|
|
644
|
+
```python
|
|
645
|
+
from adcp import ADCPMultiAgentClient, AgentConfig
|
|
646
|
+
from adcp import GetProductsRequest, CreateMediaBuyRequest, BuildCreativeRequest
|
|
647
|
+
|
|
648
|
+
# Connect to both sales and creative agents
|
|
649
|
+
async with ADCPMultiAgentClient(
|
|
650
|
+
agents=[
|
|
651
|
+
AgentConfig(id="sales", agent_uri="https://sales-agent.com", protocol="mcp"),
|
|
652
|
+
AgentConfig(id="creative", agent_uri="https://creative-agent.com", protocol="mcp"),
|
|
653
|
+
]
|
|
654
|
+
) as client:
|
|
655
|
+
|
|
656
|
+
# 1. Get products from sales agent
|
|
657
|
+
sales_agent = client.agent("sales")
|
|
658
|
+
products = await sales_agent.simple.get_products(
|
|
659
|
+
brief="Premium video inventory"
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
# 2. Get creative formats from creative agent
|
|
663
|
+
creative_agent = client.agent("creative")
|
|
664
|
+
formats = await creative_agent.simple.list_creative_formats()
|
|
665
|
+
|
|
666
|
+
# 3. Build creative asset
|
|
667
|
+
creative_result = await creative_agent.build_creative(
|
|
668
|
+
BuildCreativeRequest(
|
|
669
|
+
manifest=creative_manifest,
|
|
670
|
+
target_format_id=formats.formats[0].format_id.id
|
|
671
|
+
)
|
|
672
|
+
)
|
|
673
|
+
|
|
674
|
+
# 4. Create media buy with creative
|
|
675
|
+
media_buy_result = await sales_agent.create_media_buy(
|
|
676
|
+
CreateMediaBuyRequest(
|
|
677
|
+
brand_manifest=brand_manifest,
|
|
678
|
+
packages=[{"package_id": products.products[0].packages[0].package_id}],
|
|
679
|
+
publisher_properties=publisher_properties,
|
|
680
|
+
creative_urls=[creative_result.data.assets[0].url]
|
|
681
|
+
)
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
print(f"✅ Campaign live: {media_buy_result.data.media_buy_id}")
|
|
685
|
+
```
|
|
686
|
+
|
|
516
687
|
## Property Discovery (AdCP v2.2.0)
|
|
517
688
|
|
|
518
689
|
Build agent registries by discovering properties agents can sell:
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
adcp/__init__.py,sha256=
|
|
2
|
-
adcp/__main__.py,sha256=
|
|
1
|
+
adcp/__init__.py,sha256=KquZDNUHnEY3UG0ofpxFnAdh6XawWaNjZuNTz2QhzrY,9253
|
|
2
|
+
adcp/__main__.py,sha256=HVsuiixW-PesPtBlG1Pofot7svrl2KdSFDFLoBxxUPo,14198
|
|
3
3
|
adcp/adagents.py,sha256=o-vTBmdZvu9aER-TAlLLL3s-WGYY8N67jnrAH24lST8,22333
|
|
4
|
-
adcp/client.py,sha256=
|
|
4
|
+
adcp/client.py,sha256=m-GrXVXJN7xd1UI35ktGtIf5Sn5QH_Q2wysffuXIEEg,36658
|
|
5
5
|
adcp/config.py,sha256=Vsy7ZPOI8G3fB_i5Nk-CHbC7wdasCUWuKlos0fwA0kY,2017
|
|
6
6
|
adcp/exceptions.py,sha256=1aZEWpaM92OxD2jl9yKsqJp5ReSWaj0S0DFhxChhLlA,6732
|
|
7
7
|
adcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
adcp/simple.py,sha256=OYoAF9MBK4dkvYQz3eMOVNEC-OZUNRkCgLDxmKSNZZY,10437
|
|
9
9
|
adcp/validation.py,sha256=NsTwTQbLmd1Z1bMcztR1llJB21ai1xuw5aVrca7LoE8,6793
|
|
10
10
|
adcp/protocols/__init__.py,sha256=6UFwACQ0QadBUzy17wUROHqsJDp8ztPW2jzyl53Zh_g,262
|
|
11
|
-
adcp/protocols/a2a.py,sha256=
|
|
12
|
-
adcp/protocols/base.py,sha256=
|
|
13
|
-
adcp/protocols/mcp.py,sha256=
|
|
11
|
+
adcp/protocols/a2a.py,sha256=6xUerMXFfPLU8JmZNRwqKaBJVkIjzVCM8GIkX90zbG0,13010
|
|
12
|
+
adcp/protocols/base.py,sha256=5nbC6hS4_eTh1WziR6Mr957UoSoEc1S9eLY79lYZ2xQ,5651
|
|
13
|
+
adcp/protocols/mcp.py,sha256=TA7n2tlaBi3VDV898ZUGZXFe4ADbfGXpdF71BgfanZ8,17190
|
|
14
14
|
adcp/testing/__init__.py,sha256=ZWp_floWjVZfy8RBG5v_FUXQ8YbN7xjXvVcX-_zl_HU,1416
|
|
15
15
|
adcp/testing/test_helpers.py,sha256=-UKuxxyKQald5EvXxguQH34b3J0JdsxKH_nRT6GTjkQ,10029
|
|
16
|
-
adcp/types/__init__.py,sha256=
|
|
17
|
-
adcp/types/_generated.py,sha256=
|
|
18
|
-
adcp/types/aliases.py,sha256=
|
|
16
|
+
adcp/types/__init__.py,sha256=Bux7Vu-WLqbmWaVKo6rw-WhzOoHBV9TWy43V0yYZVwo,12639
|
|
17
|
+
adcp/types/_generated.py,sha256=3S5zgSCn8CV4bDKW4szaWVMWiVty73ACfXMvsyCYwAw,15090
|
|
18
|
+
adcp/types/aliases.py,sha256=GgUsokii7GcngnRTtLVD_r8dWTSDJcmXNj3YnGnvc7o,25150
|
|
19
19
|
adcp/types/base.py,sha256=QoEuVfI4yzefup0dc2KN11AcJTbcGxRep7xOw5hXfs8,837
|
|
20
20
|
adcp/types/core.py,sha256=RXkKCWCXS9BVJTNpe3Opm5O1I_LaQPMUuVwa-ipvS1Q,4839
|
|
21
|
-
adcp/types/stable.py,sha256=
|
|
21
|
+
adcp/types/stable.py,sha256=FNYVYOJhPCFneGwbkfAtrszuj4gkEYgJnYsV3wuXJ1E,10449
|
|
22
22
|
adcp/types/generated_poc/__init__.py,sha256=bgFFvPK1-e04eOnyw0qmtVMzoA2V7GeAMPDVrx-VIwA,103
|
|
23
|
-
adcp/types/generated_poc/activate_signal_request.py,sha256=
|
|
24
|
-
adcp/types/generated_poc/activate_signal_response.py,sha256=
|
|
23
|
+
adcp/types/generated_poc/activate_signal_request.py,sha256=SxfyRH0jC_bdZi2jFFn997pwUszmCdBhJd5rX_jXG00,1192
|
|
24
|
+
adcp/types/generated_poc/activate_signal_response.py,sha256=HrGvcNMrzl1o9lfX5c6kGopsjt-XLjvmxKFmt7iS_k4,2021
|
|
25
25
|
adcp/types/generated_poc/activation_key.py,sha256=FFUHvn-q0zKMdImOv-VHKS_78U8FVikUE8M-IOuiamg,952
|
|
26
26
|
adcp/types/generated_poc/adagents.py,sha256=tuMLnT5RRwVFCe8otpHugkz33a3IS3naLUCHUgxvk9c,7192
|
|
27
|
-
adcp/types/generated_poc/
|
|
27
|
+
adcp/types/generated_poc/asset_content_type.py,sha256=EERNQS3XQofgGNSa_JFaqcFVX-1m_N6mFEC9agLMg7I,497
|
|
28
28
|
adcp/types/generated_poc/audio_asset.py,sha256=gu1HQI0310qmY27OzHzBD_gPTPYJv7GzCDgrEymZJ-k,795
|
|
29
|
-
adcp/types/generated_poc/brand_manifest.py,sha256=
|
|
29
|
+
adcp/types/generated_poc/brand_manifest.py,sha256=eQjXoM718VjW5fqEgDYBAfeLzkyLZxk0xby8C7x8pow,7703
|
|
30
30
|
adcp/types/generated_poc/build_creative_request.py,sha256=ucFLDWaxKHJSj6U6aGyEESiSOi-xVck9_f27avFmlOE,1726
|
|
31
31
|
adcp/types/generated_poc/build_creative_response.py,sha256=alUTLetOIMjgnwc_88kNlDROEa4ccJEyRLEWEUgYiQw,1926
|
|
32
32
|
adcp/types/generated_poc/channels.py,sha256=FdeHta5dKDAxkzsvDOltFV09ACKA4eO1tNEBTui-XHc,386
|
|
@@ -37,7 +37,7 @@ adcp/types/generated_poc/cpm_fixed_option.py,sha256=q-4UKVs6S2vfXpSLlzsCpQkKTsSj
|
|
|
37
37
|
adcp/types/generated_poc/cpp_option.py,sha256=O3RXSHXDHVAKczgmeWvWgV7TLWaGC6bDy83fdeH5lhk,2069
|
|
38
38
|
adcp/types/generated_poc/cpv_option.py,sha256=xen_Hc6iY19nOoYnF_nkgTGSemjZIf7WzM-QLyyaM-s,2173
|
|
39
39
|
adcp/types/generated_poc/create_media_buy_request.py,sha256=kCC3RP2dT7LCSiAhHSQhfrlkcbXZLuFQspujNIGYzFs,3529
|
|
40
|
-
adcp/types/generated_poc/create_media_buy_response.py,sha256=
|
|
40
|
+
adcp/types/generated_poc/create_media_buy_response.py,sha256=iZ84Ged0G2hSmVSuPeXpCIm38v50XUa8b7Pco6DiO8Y,2252
|
|
41
41
|
adcp/types/generated_poc/creative_asset.py,sha256=v4ZBMC-sy3JHNC9hC3_RDaoi9hIzWqOoD7B4Bvk3f4I,2663
|
|
42
42
|
adcp/types/generated_poc/creative_assignment.py,sha256=G5YOU1JxH6YKV-K9tWv4OqkIkK1lnBxGgFiXTZGkT_8,933
|
|
43
43
|
adcp/types/generated_poc/creative_manifest.py,sha256=Z6UCWDrAOzct8DuWNNmTO46apCf_5oRpNaSUVx_2CIU,2155
|
|
@@ -47,11 +47,12 @@ adcp/types/generated_poc/css_asset.py,sha256=oUGoxGhnPkZCtmlP6IoF828LU7K2wYnt8Y5
|
|
|
47
47
|
adcp/types/generated_poc/daast_asset.py,sha256=L3RE86oAA4GAeDdI-HTzvbgpLxiUOqlUrhWLLCMelHc,2401
|
|
48
48
|
adcp/types/generated_poc/delivery_metrics.py,sha256=qcsPadb6h5Ro_J5sKJYcK32WeY4ymrR8H2QJ2qI-m_k,4468
|
|
49
49
|
adcp/types/generated_poc/delivery_type.py,sha256=-jC7Xv99_j-U4LxEjbDzdMJ_WOdlANuE5-agStgCkPE,264
|
|
50
|
-
adcp/types/generated_poc/deployment.py,sha256=
|
|
51
|
-
adcp/types/generated_poc/destination.py,sha256=
|
|
50
|
+
adcp/types/generated_poc/deployment.py,sha256=dy186zXN8tzTQpZI-uD03Pf2KFPAN_4rs-9IjH0Ol5E,2861
|
|
51
|
+
adcp/types/generated_poc/destination.py,sha256=lsLuKToqtzf8DxKv8xZFugW0RSTJMjKQ707vg7n1FK0,1275
|
|
52
52
|
adcp/types/generated_poc/error.py,sha256=D4JaWK_K7xtMjgSTrvkDebn8h0gJJfc02B5tTEeCg8w,1014
|
|
53
53
|
adcp/types/generated_poc/flat_rate_option.py,sha256=h7pSLXxCltFwYaa-Ld3hxd1UGkutk9MU24xQgfHeT6U,2967
|
|
54
|
-
adcp/types/generated_poc/format.py,sha256=
|
|
54
|
+
adcp/types/generated_poc/format.py,sha256=qSzimVP9WpVwkuSdjEYzRne-i1UMrUaC_lnaMXbe96s,9069
|
|
55
|
+
adcp/types/generated_poc/format_category.py,sha256=xq1ApHMPJOv3dCBkzJAA5sCKWQu8Ts_Dern5a7SjdRI,362
|
|
55
56
|
adcp/types/generated_poc/format_id.py,sha256=J10JarmfjAeTIPxAxaO4NalKy7vfFqfcdjol2d23Bcs,864
|
|
56
57
|
adcp/types/generated_poc/frequency_cap.py,sha256=XHHyTZgkpEYB-n4uqHYcnVKLqyxuD0eR7DXCnAHzv7Q,475
|
|
57
58
|
adcp/types/generated_poc/frequency_cap_scope.py,sha256=O8HD_egs-xpXbSUQYZ9w2HwiC_hZa1aQvlxGJOIItvA,437
|
|
@@ -59,15 +60,15 @@ adcp/types/generated_poc/get_media_buy_delivery_request.py,sha256=mPl7QJJLsuaZxq
|
|
|
59
60
|
adcp/types/generated_poc/get_media_buy_delivery_response.py,sha256=VDBU8vfC3RbA6W1dWOO5IlC6HbqPgQtoD4gxMBdppYg,8164
|
|
60
61
|
adcp/types/generated_poc/get_products_request.py,sha256=7S-STQcMQeu8gevskVZJLRDqWuJeR5754GFmNmy3T40,2916
|
|
61
62
|
adcp/types/generated_poc/get_products_response.py,sha256=BZ8Cd9YzIu_Bischz1JTVLT4frmCf9574RATOlceRgI,934
|
|
62
|
-
adcp/types/generated_poc/get_signals_request.py,sha256
|
|
63
|
-
adcp/types/generated_poc/get_signals_response.py,sha256=
|
|
63
|
+
adcp/types/generated_poc/get_signals_request.py,sha256=-GdevbjuEUaRShOt_yAk2V6wFEH-IB9zbav7r0L90mw,2557
|
|
64
|
+
adcp/types/generated_poc/get_signals_response.py,sha256=wL7eSMT4zG3HbMvlxWw2Pe8j1O_qiamwKFqI9P1lJMQ,2206
|
|
64
65
|
adcp/types/generated_poc/html_asset.py,sha256=WgeUmtLtVlgqVLK965t4ZyxTV6HRR1wM2qyTXNSMddc,505
|
|
65
66
|
adcp/types/generated_poc/identifier_types.py,sha256=Cd4RcYUWLxG_g-hPEFaY40FOegNu32NNdbsKec54OVE,860
|
|
66
67
|
adcp/types/generated_poc/image_asset.py,sha256=t_KTwQjFlqBnB1Wl26cpBS3ohxFKWxkFyz1WKkrpA9M,836
|
|
67
68
|
adcp/types/generated_poc/javascript_asset.py,sha256=OLL1F1hr_hIbaqhesAeY_rM0edASRMzrZLqUoLcZdrs,640
|
|
68
69
|
adcp/types/generated_poc/list_authorized_properties_request.py,sha256=uq3irNREbcwnZdh8tL3BrT2thpsfl6ieaBx3MijscJQ,1283
|
|
69
70
|
adcp/types/generated_poc/list_authorized_properties_response.py,sha256=42FUGi2WOrkTKxZ79EVH-Mfn7xOvGxkNHqdhmOsKvCA,3260
|
|
70
|
-
adcp/types/generated_poc/list_creative_formats_request.py,sha256=
|
|
71
|
+
adcp/types/generated_poc/list_creative_formats_request.py,sha256=2vR7TosfLsmEBUGkXe1N2XsPjYb05TAdl3enfnPjxkQ,2886
|
|
71
72
|
adcp/types/generated_poc/list_creative_formats_response.py,sha256=0S_Lc_z2Hwxb4GQYjZcwv4B0-51WVV1TGbScUvAhLVc,2136
|
|
72
73
|
adcp/types/generated_poc/list_creatives_request.py,sha256=JhgkI4kse2AJ2omqWriTH6VwSyKcPJCkWsBiPNkdGr4,5319
|
|
73
74
|
adcp/types/generated_poc/list_creatives_response.py,sha256=_wAb4q5KNiTi8mWA7gAkupIfReeyoGl_GN9y4Kg7qg4,7455
|
|
@@ -110,7 +111,7 @@ adcp/types/generated_poc/tasks_list_request.py,sha256=ncYYLP9jN06yyYnZn7I8bcU3av
|
|
|
110
111
|
adcp/types/generated_poc/tasks_list_response.py,sha256=5R77z9D9uvWjqj44fOPNEDPUVeDn-O7nGx1WI9kq1JM,4063
|
|
111
112
|
adcp/types/generated_poc/text_asset.py,sha256=fiV29xHQtjv46q-RlttwUqnetMVzefpcAr-pBOJSIv4,532
|
|
112
113
|
adcp/types/generated_poc/update_media_buy_request.py,sha256=LvjUikN-D2HmgeQzXN-5Lj3ciprmz1HBI5qxfjoQhDY,6071
|
|
113
|
-
adcp/types/generated_poc/update_media_buy_response.py,sha256=
|
|
114
|
+
adcp/types/generated_poc/update_media_buy_response.py,sha256=Q6tSs5zt0bdAGxrQ7CL4V3chdthQFGcZxJIr8882XfA,2285
|
|
114
115
|
adcp/types/generated_poc/url_asset.py,sha256=jswm-gVfddxa5jii1ljbBHZrw3BAhjmGZlHmPGxAnZE,1114
|
|
115
116
|
adcp/types/generated_poc/vast_asset.py,sha256=LGzbgl_GVsSf9bcwuqiM6iM2GjSM81pW0Iz3DTrhWwM,2679
|
|
116
117
|
adcp/types/generated_poc/vcpm_auction_option.py,sha256=lWT55gEltr4415vu1eYNWZroKKi5AGlZfnqlvJBNmwg,2012
|
|
@@ -122,9 +123,9 @@ adcp/utils/__init__.py,sha256=uetvSJB19CjQbtwEYZiTnumJG11GsafQmXm5eR3hL7E,153
|
|
|
122
123
|
adcp/utils/operation_id.py,sha256=wQX9Bb5epXzRq23xoeYPTqzu5yLuhshg7lKJZihcM2k,294
|
|
123
124
|
adcp/utils/preview_cache.py,sha256=PH9bSDOPQzLKqkC_o0a9Xn2i4cNC2oy76dkJdS3j7ck,18491
|
|
124
125
|
adcp/utils/response_parser.py,sha256=uPk2vIH-RYZmq7y3i8lC4HTMQ3FfKdlgXKTjgJ1955M,6253
|
|
125
|
-
adcp-2.
|
|
126
|
-
adcp-2.
|
|
127
|
-
adcp-2.
|
|
128
|
-
adcp-2.
|
|
129
|
-
adcp-2.
|
|
130
|
-
adcp-2.
|
|
126
|
+
adcp-2.9.0.dist-info/licenses/LICENSE,sha256=PF39NR3Ae8PLgBhg3Uxw6ju7iGVIf8hfv9LRWQdii_U,629
|
|
127
|
+
adcp-2.9.0.dist-info/METADATA,sha256=KZ4Ll6ntUHU-CjH0SAMMvjPjzpUIPd37zDq0aWgjJsU,31357
|
|
128
|
+
adcp-2.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
129
|
+
adcp-2.9.0.dist-info/entry_points.txt,sha256=DQKpcGsJX8DtVI_SGApQ7tNvqUB4zkTLaTAEpFgmi3U,44
|
|
130
|
+
adcp-2.9.0.dist-info/top_level.txt,sha256=T1_NF0GefncFU9v_k56oDwKSJREyCqIM8lAwNZf0EOs,5
|
|
131
|
+
adcp-2.9.0.dist-info/RECORD,,
|