adcp 2.4.1__py3-none-any.whl → 2.5.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 +4 -1
- adcp/types/__init__.py +3 -0
- adcp/types/_generated.py +1 -1
- adcp/types/aliases.py +54 -0
- adcp/types/stable.py +4 -2
- {adcp-2.4.1.dist-info → adcp-2.5.0.dist-info}/METADATA +17 -2
- {adcp-2.4.1.dist-info → adcp-2.5.0.dist-info}/RECORD +11 -11
- {adcp-2.4.1.dist-info → adcp-2.5.0.dist-info}/WHEEL +0 -0
- {adcp-2.4.1.dist-info → adcp-2.5.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.4.1.dist-info → adcp-2.5.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.4.1.dist-info → adcp-2.5.0.dist-info}/top_level.txt +0 -0
adcp/__init__.py
CHANGED
|
@@ -104,6 +104,7 @@ from adcp.types.aliases import (
|
|
|
104
104
|
BothPreviewRender,
|
|
105
105
|
BuildCreativeErrorResponse,
|
|
106
106
|
BuildCreativeSuccessResponse,
|
|
107
|
+
CreatedPackageReference,
|
|
107
108
|
CreateMediaBuyErrorResponse,
|
|
108
109
|
CreateMediaBuySuccessResponse,
|
|
109
110
|
HtmlPreviewRender,
|
|
@@ -164,7 +165,7 @@ from adcp.validation import (
|
|
|
164
165
|
validate_publisher_properties_item,
|
|
165
166
|
)
|
|
166
167
|
|
|
167
|
-
__version__ = "2.
|
|
168
|
+
__version__ = "2.5.0"
|
|
168
169
|
|
|
169
170
|
__all__ = [
|
|
170
171
|
# Client classes
|
|
@@ -213,6 +214,8 @@ __all__ = [
|
|
|
213
214
|
"CreativeManifest",
|
|
214
215
|
"MediaBuy",
|
|
215
216
|
"Package",
|
|
217
|
+
# Package type aliases
|
|
218
|
+
"CreatedPackageReference",
|
|
216
219
|
# Status enums (for control flow)
|
|
217
220
|
"CreativeStatus",
|
|
218
221
|
"MediaBuyStatus",
|
adcp/types/__init__.py
CHANGED
|
@@ -12,6 +12,7 @@ adcp.types or adcp.types.stable for stable, versioned types.
|
|
|
12
12
|
|
|
13
13
|
from adcp.types.aliases import (
|
|
14
14
|
BothPreviewRender,
|
|
15
|
+
CreatedPackageReference,
|
|
15
16
|
HtmlPreviewRender,
|
|
16
17
|
InlineDaastAsset,
|
|
17
18
|
InlineVastAsset,
|
|
@@ -86,6 +87,8 @@ __all__ = [
|
|
|
86
87
|
"UrlDaastAsset",
|
|
87
88
|
"UrlPreviewRender",
|
|
88
89
|
"UrlVastAsset",
|
|
90
|
+
# Package type aliases
|
|
91
|
+
"CreatedPackageReference",
|
|
89
92
|
# Stable API types (commonly used)
|
|
90
93
|
"BrandManifest",
|
|
91
94
|
"Creative",
|
adcp/types/_generated.py
CHANGED
|
@@ -10,7 +10,7 @@ Auto-generated by datamodel-code-generator from JSON schemas.
|
|
|
10
10
|
DO NOT EDIT MANUALLY.
|
|
11
11
|
|
|
12
12
|
Generated from: https://github.com/adcontextprotocol/adcp/tree/main/schemas
|
|
13
|
-
Generation date: 2025-11-18 12:
|
|
13
|
+
Generation date: 2025-11-18 12:52:17 UTC
|
|
14
14
|
"""
|
|
15
15
|
# ruff: noqa: E501, I001
|
|
16
16
|
from __future__ import annotations
|
adcp/types/aliases.py
CHANGED
|
@@ -78,6 +78,12 @@ from adcp.types._generated import (
|
|
|
78
78
|
VastAsset2,
|
|
79
79
|
)
|
|
80
80
|
|
|
81
|
+
# Import Package types directly from their modules to avoid collision issues
|
|
82
|
+
from adcp.types.generated_poc.create_media_buy_response import (
|
|
83
|
+
Package as CreatedPackageInternal,
|
|
84
|
+
)
|
|
85
|
+
from adcp.types.generated_poc.package import Package as FullPackageInternal
|
|
86
|
+
|
|
81
87
|
# ============================================================================
|
|
82
88
|
# RESPONSE TYPE ALIASES - Success/Error Discriminated Unions
|
|
83
89
|
# ============================================================================
|
|
@@ -201,6 +207,51 @@ MediaSubAsset = SubAsset1
|
|
|
201
207
|
TextSubAsset = SubAsset2
|
|
202
208
|
"""SubAsset for text content (headlines, body text) - asset_kind='text', provides content."""
|
|
203
209
|
|
|
210
|
+
# ============================================================================
|
|
211
|
+
# PACKAGE TYPE ALIASES - Resolving Type Name Collisions
|
|
212
|
+
# ============================================================================
|
|
213
|
+
# The AdCP schemas define two genuinely different types both named "Package":
|
|
214
|
+
#
|
|
215
|
+
# 1. Full Package (from package.json schema):
|
|
216
|
+
# - Complete operational package with all fields (budget, pricing_option_id, etc.)
|
|
217
|
+
# - Used in MediaBuy, update operations, and package management
|
|
218
|
+
# - Has 12+ fields for full package configuration
|
|
219
|
+
#
|
|
220
|
+
# 2. Created Package (from create-media-buy-response.json schema):
|
|
221
|
+
# - Minimal response type with only IDs (buyer_ref, package_id)
|
|
222
|
+
# - Used in CreateMediaBuy success responses
|
|
223
|
+
# - Only 2 fields - represents newly created package references
|
|
224
|
+
#
|
|
225
|
+
# The code generator's "first wins" collision handling exports the Created Package
|
|
226
|
+
# as "Package", shadowing the Full Package. These semantic aliases provide clear,
|
|
227
|
+
# unambiguous names for both types.
|
|
228
|
+
|
|
229
|
+
Package = FullPackageInternal
|
|
230
|
+
"""Complete package configuration with all operational fields.
|
|
231
|
+
|
|
232
|
+
This is the canonical Package type used throughout AdCP for package management.
|
|
233
|
+
|
|
234
|
+
Used in:
|
|
235
|
+
- MediaBuy.packages (list of full package details)
|
|
236
|
+
- Update operations (modifying existing packages)
|
|
237
|
+
- Package management (creating/configuring packages)
|
|
238
|
+
|
|
239
|
+
Fields include: budget, pricing_option_id, product_id, status, bid_price,
|
|
240
|
+
creative_assignments, format_ids_to_provide, impressions, pacing, targeting_overlay
|
|
241
|
+
"""
|
|
242
|
+
|
|
243
|
+
CreatedPackageReference = CreatedPackageInternal
|
|
244
|
+
"""Minimal package reference with only IDs returned after creation.
|
|
245
|
+
|
|
246
|
+
This is NOT the full Package type - it's a lightweight reference returned
|
|
247
|
+
in CreateMediaBuySuccessResponse to indicate which packages were created.
|
|
248
|
+
|
|
249
|
+
Used in:
|
|
250
|
+
- CreateMediaBuySuccessResponse.packages (list of created package references)
|
|
251
|
+
|
|
252
|
+
Fields: buyer_ref, package_id only
|
|
253
|
+
"""
|
|
254
|
+
|
|
204
255
|
# ============================================================================
|
|
205
256
|
# EXPORTS
|
|
206
257
|
# ============================================================================
|
|
@@ -246,4 +297,7 @@ __all__ = [
|
|
|
246
297
|
# Update media buy responses
|
|
247
298
|
"UpdateMediaBuySuccessResponse",
|
|
248
299
|
"UpdateMediaBuyErrorResponse",
|
|
300
|
+
# Package type aliases
|
|
301
|
+
"CreatedPackageReference",
|
|
302
|
+
"Package",
|
|
249
303
|
]
|
adcp/types/stable.py
CHANGED
|
@@ -21,7 +21,6 @@ Schema Evolution:
|
|
|
21
21
|
|
|
22
22
|
from __future__ import annotations
|
|
23
23
|
|
|
24
|
-
# Import all generated types from internal consolidated module
|
|
25
24
|
from adcp.types._generated import (
|
|
26
25
|
# Core request/response types
|
|
27
26
|
ActivateSignalRequest,
|
|
@@ -67,7 +66,6 @@ from adcp.types._generated import (
|
|
|
67
66
|
MarkdownAsset,
|
|
68
67
|
MediaBuy,
|
|
69
68
|
MediaBuyStatus,
|
|
70
|
-
Package,
|
|
71
69
|
PackageStatus,
|
|
72
70
|
PreviewCreativeRequest,
|
|
73
71
|
PreviewCreativeResponse,
|
|
@@ -94,6 +92,10 @@ from adcp.types._generated import (
|
|
|
94
92
|
WebhookAsset,
|
|
95
93
|
)
|
|
96
94
|
|
|
95
|
+
# Import all generated types from internal consolidated module
|
|
96
|
+
# Import Package directly from its module to avoid collision with Response Package
|
|
97
|
+
from adcp.types.generated_poc.package import Package
|
|
98
|
+
|
|
97
99
|
# Note: BrandManifest is currently split into BrandManifest1/2 due to upstream schema
|
|
98
100
|
# using anyOf incorrectly. This will be fixed upstream to create a single BrandManifest type.
|
|
99
101
|
# For now, users should use BrandManifest1 (url required) which is most common.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adcp
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.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
|
|
@@ -35,6 +35,8 @@ Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
|
35
35
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
36
36
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
37
37
|
Requires-Dist: datamodel-code-generator[http]>=0.35.0; extra == "dev"
|
|
38
|
+
Provides-Extra: docs
|
|
39
|
+
Requires-Dist: pdoc3>=0.10.0; extra == "docs"
|
|
38
40
|
Dynamic: license-file
|
|
39
41
|
|
|
40
42
|
# adcp - Python Client for Ad Context Protocol
|
|
@@ -177,6 +179,18 @@ async with ADCPMultiAgentClient(
|
|
|
177
179
|
# Connections automatically cleaned up here
|
|
178
180
|
```
|
|
179
181
|
|
|
182
|
+
## Documentation
|
|
183
|
+
|
|
184
|
+
- **[API Reference](https://adcontextprotocol.github.io/adcp-client-python/)** - Complete API documentation with type signatures and examples
|
|
185
|
+
- **[Protocol Spec](https://github.com/adcontextprotocol/adcp)** - Ad Context Protocol specification
|
|
186
|
+
- **[Examples](examples/)** - Code examples and usage patterns
|
|
187
|
+
|
|
188
|
+
The API reference documentation is automatically generated from the code and includes:
|
|
189
|
+
- Full type signatures for all methods
|
|
190
|
+
- Field descriptions from JSON Schema
|
|
191
|
+
- Method documentation with examples
|
|
192
|
+
- Searchable interface
|
|
193
|
+
|
|
180
194
|
## Features
|
|
181
195
|
|
|
182
196
|
### Test Helpers
|
|
@@ -801,6 +815,7 @@ Apache 2.0 License - see [LICENSE](LICENSE) file for details.
|
|
|
801
815
|
|
|
802
816
|
## Support
|
|
803
817
|
|
|
804
|
-
- **
|
|
818
|
+
- **API Reference**: [adcontextprotocol.github.io/adcp-client-python](https://adcontextprotocol.github.io/adcp-client-python/)
|
|
819
|
+
- **Protocol Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org)
|
|
805
820
|
- **Issues**: [GitHub Issues](https://github.com/adcontextprotocol/adcp-client-python/issues)
|
|
806
821
|
- **Protocol Spec**: [AdCP Specification](https://github.com/adcontextprotocol/adcp)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
adcp/__init__.py,sha256=
|
|
1
|
+
adcp/__init__.py,sha256=09hCpp_u_UXT672Lo8HbPTu_RNiWWzQf-UGBVIqFjds,8592
|
|
2
2
|
adcp/__main__.py,sha256=YF2GUXF1LICW1TPxNQiGIfSp5cpAsejoEG2fuOgbzrc,12839
|
|
3
3
|
adcp/adagents.py,sha256=o-vTBmdZvu9aER-TAlLLL3s-WGYY8N67jnrAH24lST8,22333
|
|
4
4
|
adcp/client.py,sha256=Z70D0bHcLNmr0NBGXbFUvW8dBdzHkcv8CmFcYo3pIjw,28803
|
|
@@ -13,12 +13,12 @@ adcp/protocols/base.py,sha256=vBHD23Fzl_CCk_Gy9nvSbBYopcJlYkYyzoz-rhI8wHg,5214
|
|
|
13
13
|
adcp/protocols/mcp.py,sha256=d9uSpGd0BKvQ0JxztkfDvHwoDrDYhuiw5oivpYOAbmM,16647
|
|
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=CXlUUpMRWyM20focXgl8pEz3WMqvpjAW9PzmyHXKRzA,2608
|
|
17
|
+
adcp/types/_generated.py,sha256=p4U_P3BROGjCnS0Cd2o9ZJ_bShQLffB3D9_0D29JB0g,14926
|
|
18
|
+
adcp/types/aliases.py,sha256=FGb7zYy6V2gKtzWWc2c_vx3NLwXYpEsyjts9peyOixQ,11244
|
|
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=Q_rxnpLuUGfqGusiJcMuPADIGLQgs2uLp98S4YnAksw,4997
|
|
22
22
|
adcp/types/generated_poc/__init__.py,sha256=bgFFvPK1-e04eOnyw0qmtVMzoA2V7GeAMPDVrx-VIwA,103
|
|
23
23
|
adcp/types/generated_poc/activate_signal_request.py,sha256=mI1MskO30yEcbQQ7ueEExMF7FhfARQj0_kbz5CAdSzQ,1188
|
|
24
24
|
adcp/types/generated_poc/activate_signal_response.py,sha256=ltt5yDsocK3VfELeRuMjUiNMmUZe__VP5az6fsMCOuc,2015
|
|
@@ -121,9 +121,9 @@ adcp/utils/__init__.py,sha256=uetvSJB19CjQbtwEYZiTnumJG11GsafQmXm5eR3hL7E,153
|
|
|
121
121
|
adcp/utils/operation_id.py,sha256=wQX9Bb5epXzRq23xoeYPTqzu5yLuhshg7lKJZihcM2k,294
|
|
122
122
|
adcp/utils/preview_cache.py,sha256=oc1AUkPrHHmUqfZa5920OCKY7qrDDR86XO6oi1PEHTA,18504
|
|
123
123
|
adcp/utils/response_parser.py,sha256=uPk2vIH-RYZmq7y3i8lC4HTMQ3FfKdlgXKTjgJ1955M,6253
|
|
124
|
-
adcp-2.
|
|
125
|
-
adcp-2.
|
|
126
|
-
adcp-2.
|
|
127
|
-
adcp-2.
|
|
128
|
-
adcp-2.
|
|
129
|
-
adcp-2.
|
|
124
|
+
adcp-2.5.0.dist-info/licenses/LICENSE,sha256=PF39NR3Ae8PLgBhg3Uxw6ju7iGVIf8hfv9LRWQdii_U,629
|
|
125
|
+
adcp-2.5.0.dist-info/METADATA,sha256=FckzUUiNpYqMSnMYPC810uZJL8il646fzXbR_-ooPXI,25810
|
|
126
|
+
adcp-2.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
127
|
+
adcp-2.5.0.dist-info/entry_points.txt,sha256=DQKpcGsJX8DtVI_SGApQ7tNvqUB4zkTLaTAEpFgmi3U,44
|
|
128
|
+
adcp-2.5.0.dist-info/top_level.txt,sha256=T1_NF0GefncFU9v_k56oDwKSJREyCqIM8lAwNZf0EOs,5
|
|
129
|
+
adcp-2.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|