adcp 2.4.1__tar.gz → 2.5.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.
Files changed (147) hide show
  1. {adcp-2.4.1/src/adcp.egg-info → adcp-2.5.0}/PKG-INFO +17 -2
  2. {adcp-2.4.1 → adcp-2.5.0}/README.md +14 -1
  3. {adcp-2.4.1 → adcp-2.5.0}/pyproject.toml +4 -1
  4. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/__init__.py +4 -1
  5. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/__init__.py +3 -0
  6. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/_generated.py +1 -1
  7. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/aliases.py +54 -0
  8. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/stable.py +4 -2
  9. {adcp-2.4.1 → adcp-2.5.0/src/adcp.egg-info}/PKG-INFO +17 -2
  10. {adcp-2.4.1 → adcp-2.5.0}/src/adcp.egg-info/requires.txt +3 -0
  11. {adcp-2.4.1 → adcp-2.5.0}/tests/test_discriminated_unions.py +3 -5
  12. {adcp-2.4.1 → adcp-2.5.0}/tests/test_public_api.py +21 -12
  13. {adcp-2.4.1 → adcp-2.5.0}/tests/test_type_aliases.py +124 -10
  14. {adcp-2.4.1 → adcp-2.5.0}/LICENSE +0 -0
  15. {adcp-2.4.1 → adcp-2.5.0}/setup.cfg +0 -0
  16. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/__main__.py +0 -0
  17. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/adagents.py +0 -0
  18. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/client.py +0 -0
  19. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/config.py +0 -0
  20. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/exceptions.py +0 -0
  21. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/protocols/__init__.py +0 -0
  22. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/protocols/a2a.py +0 -0
  23. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/protocols/base.py +0 -0
  24. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/protocols/mcp.py +0 -0
  25. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/py.typed +0 -0
  26. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/simple.py +0 -0
  27. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/testing/__init__.py +0 -0
  28. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/testing/test_helpers.py +0 -0
  29. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/base.py +0 -0
  30. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/core.py +0 -0
  31. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/__init__.py +0 -0
  32. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/activate_signal_request.py +0 -0
  33. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/activate_signal_response.py +0 -0
  34. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/activation_key.py +0 -0
  35. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/adagents.py +0 -0
  36. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/asset_type.py +0 -0
  37. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/audio_asset.py +0 -0
  38. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/brand_manifest.py +0 -0
  39. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/build_creative_request.py +0 -0
  40. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/build_creative_response.py +0 -0
  41. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/channels.py +0 -0
  42. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/cpc_option.py +0 -0
  43. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/cpcv_option.py +0 -0
  44. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/cpm_auction_option.py +0 -0
  45. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/cpm_fixed_option.py +0 -0
  46. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/cpp_option.py +0 -0
  47. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/cpv_option.py +0 -0
  48. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/create_media_buy_request.py +0 -0
  49. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/create_media_buy_response.py +0 -0
  50. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/creative_asset.py +0 -0
  51. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/creative_assignment.py +0 -0
  52. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/creative_manifest.py +0 -0
  53. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/creative_policy.py +0 -0
  54. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/creative_status.py +0 -0
  55. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/css_asset.py +0 -0
  56. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/daast_asset.py +0 -0
  57. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/delivery_metrics.py +0 -0
  58. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/delivery_type.py +0 -0
  59. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/deployment.py +0 -0
  60. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/destination.py +0 -0
  61. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/error.py +0 -0
  62. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/flat_rate_option.py +0 -0
  63. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/format.py +0 -0
  64. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/format_id.py +0 -0
  65. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/frequency_cap.py +0 -0
  66. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/frequency_cap_scope.py +0 -0
  67. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/get_media_buy_delivery_request.py +0 -0
  68. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/get_media_buy_delivery_response.py +0 -0
  69. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/get_products_request.py +0 -0
  70. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/get_products_response.py +0 -0
  71. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/get_signals_request.py +0 -0
  72. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/get_signals_response.py +0 -0
  73. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/html_asset.py +0 -0
  74. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/identifier_types.py +0 -0
  75. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/image_asset.py +0 -0
  76. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/javascript_asset.py +0 -0
  77. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/list_authorized_properties_request.py +0 -0
  78. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/list_authorized_properties_response.py +0 -0
  79. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/list_creative_formats_request.py +0 -0
  80. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/list_creative_formats_response.py +0 -0
  81. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/list_creatives_request.py +0 -0
  82. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/list_creatives_response.py +0 -0
  83. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/markdown_asset.py +0 -0
  84. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/measurement.py +0 -0
  85. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/media_buy.py +0 -0
  86. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/media_buy_status.py +0 -0
  87. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/pacing.py +0 -0
  88. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/package.py +0 -0
  89. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/package_request.py +0 -0
  90. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/package_status.py +0 -0
  91. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/performance_feedback.py +0 -0
  92. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/placement.py +0 -0
  93. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/preview_creative_request.py +0 -0
  94. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/preview_creative_response.py +0 -0
  95. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/preview_render.py +0 -0
  96. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/pricing_model.py +0 -0
  97. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/product.py +0 -0
  98. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/promoted_offerings.py +0 -0
  99. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/promoted_products.py +0 -0
  100. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/property.py +0 -0
  101. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/protocol_envelope.py +0 -0
  102. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/provide_performance_feedback_request.py +0 -0
  103. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/provide_performance_feedback_response.py +0 -0
  104. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/publisher_identifier_types.py +0 -0
  105. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/push_notification_config.py +0 -0
  106. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/reporting_capabilities.py +0 -0
  107. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/response.py +0 -0
  108. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/standard_format_ids.py +0 -0
  109. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/sub_asset.py +0 -0
  110. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/sync_creatives_request.py +0 -0
  111. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/sync_creatives_response.py +0 -0
  112. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/targeting.py +0 -0
  113. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/task_status.py +0 -0
  114. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/task_type.py +0 -0
  115. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/tasks_get_request.py +0 -0
  116. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/tasks_get_response.py +0 -0
  117. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/tasks_list_request.py +0 -0
  118. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/tasks_list_response.py +0 -0
  119. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/text_asset.py +0 -0
  120. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/update_media_buy_request.py +0 -0
  121. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/update_media_buy_response.py +0 -0
  122. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/url_asset.py +0 -0
  123. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/vast_asset.py +0 -0
  124. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/vcpm_auction_option.py +0 -0
  125. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/vcpm_fixed_option.py +0 -0
  126. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/video_asset.py +0 -0
  127. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/webhook_asset.py +0 -0
  128. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/types/generated_poc/webhook_payload.py +0 -0
  129. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/utils/__init__.py +0 -0
  130. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/utils/operation_id.py +0 -0
  131. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/utils/preview_cache.py +0 -0
  132. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/utils/response_parser.py +0 -0
  133. {adcp-2.4.1 → adcp-2.5.0}/src/adcp/validation.py +0 -0
  134. {adcp-2.4.1 → adcp-2.5.0}/src/adcp.egg-info/SOURCES.txt +0 -0
  135. {adcp-2.4.1 → adcp-2.5.0}/src/adcp.egg-info/dependency_links.txt +0 -0
  136. {adcp-2.4.1 → adcp-2.5.0}/src/adcp.egg-info/entry_points.txt +0 -0
  137. {adcp-2.4.1 → adcp-2.5.0}/src/adcp.egg-info/top_level.txt +0 -0
  138. {adcp-2.4.1 → adcp-2.5.0}/tests/test_adagents.py +0 -0
  139. {adcp-2.4.1 → adcp-2.5.0}/tests/test_cli.py +0 -0
  140. {adcp-2.4.1 → adcp-2.5.0}/tests/test_client.py +5 -5
  141. {adcp-2.4.1 → adcp-2.5.0}/tests/test_code_generation.py +0 -0
  142. {adcp-2.4.1 → adcp-2.5.0}/tests/test_format_id_validation.py +0 -0
  143. {adcp-2.4.1 → adcp-2.5.0}/tests/test_helpers.py +0 -0
  144. {adcp-2.4.1 → adcp-2.5.0}/tests/test_preview_html.py +1 -1
  145. {adcp-2.4.1 → adcp-2.5.0}/tests/test_protocols.py +0 -0
  146. {adcp-2.4.1 → adcp-2.5.0}/tests/test_response_parser.py +0 -0
  147. {adcp-2.4.1 → adcp-2.5.0}/tests/test_simple_api.py +1 -1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adcp
3
- Version: 2.4.1
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
- - **Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org)
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)
@@ -138,6 +138,18 @@ async with ADCPMultiAgentClient(
138
138
  # Connections automatically cleaned up here
139
139
  ```
140
140
 
141
+ ## Documentation
142
+
143
+ - **[API Reference](https://adcontextprotocol.github.io/adcp-client-python/)** - Complete API documentation with type signatures and examples
144
+ - **[Protocol Spec](https://github.com/adcontextprotocol/adcp)** - Ad Context Protocol specification
145
+ - **[Examples](examples/)** - Code examples and usage patterns
146
+
147
+ The API reference documentation is automatically generated from the code and includes:
148
+ - Full type signatures for all methods
149
+ - Field descriptions from JSON Schema
150
+ - Method documentation with examples
151
+ - Searchable interface
152
+
141
153
  ## Features
142
154
 
143
155
  ### Test Helpers
@@ -762,6 +774,7 @@ Apache 2.0 License - see [LICENSE](LICENSE) file for details.
762
774
 
763
775
  ## Support
764
776
 
765
- - **Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org)
777
+ - **API Reference**: [adcontextprotocol.github.io/adcp-client-python](https://adcontextprotocol.github.io/adcp-client-python/)
778
+ - **Protocol Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org)
766
779
  - **Issues**: [GitHub Issues](https://github.com/adcontextprotocol/adcp-client-python/issues)
767
780
  - **Protocol Spec**: [AdCP Specification](https://github.com/adcontextprotocol/adcp)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "adcp"
7
- version = "2.4.1"
7
+ version = "2.5.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"}
@@ -47,6 +47,9 @@ dev = [
47
47
  "ruff>=0.1.0",
48
48
  "datamodel-code-generator[http]>=0.35.0",
49
49
  ]
50
+ docs = [
51
+ "pdoc3>=0.10.0",
52
+ ]
50
53
 
51
54
  [project.urls]
52
55
  Homepage = "https://github.com/adcontextprotocol/adcp-client-python"
@@ -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.4.1"
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",
@@ -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",
@@ -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:11:55 UTC
13
+ Generation date: 2025-11-18 12:52:17 UTC
14
14
  """
15
15
  # ruff: noqa: E501, I001
16
16
  from __future__ import annotations
@@ -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
  ]
@@ -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.4.1
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
- - **Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org)
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)
@@ -13,3 +13,6 @@ mypy>=1.0.0
13
13
  black>=23.0.0
14
14
  ruff>=0.1.0
15
15
  datamodel-code-generator[http]>=0.35.0
16
+
17
+ [docs]
18
+ pdoc3>=0.10.0
@@ -16,7 +16,6 @@ from adcp import (
16
16
  InlineDaastAsset,
17
17
  InlineVastAsset,
18
18
  MediaSubAsset,
19
- Product,
20
19
  TextSubAsset,
21
20
  UrlDaastAsset,
22
21
  UrlPreviewRender,
@@ -34,7 +33,6 @@ from adcp.types._generated import (
34
33
  Deployment2, # Agent
35
34
  Destination1, # Platform
36
35
  Destination2, # Agent
37
- PublisherProperties, # selection_type='all'
38
36
  PublisherProperties4, # selection_type='by_id'
39
37
  PublisherProperties5, # selection_type='by_tag'
40
38
  )
@@ -86,7 +84,7 @@ class TestAuthorizationDiscriminatedUnions:
86
84
  assert "authorization_type" in error_msg.lower()
87
85
 
88
86
  def test_property_tags_authorization(self):
89
- """AuthorizedAgents1 (property_tags variant) requires property_tags and authorization_type."""
87
+ """AuthorizedAgents1 requires property_tags and authorization_type."""
90
88
  agent = AuthorizedAgents1(
91
89
  url="https://agent.example.com",
92
90
  authorized_for="All properties",
@@ -98,7 +96,7 @@ class TestAuthorizationDiscriminatedUnions:
98
96
  assert not hasattr(agent, "property_ids")
99
97
 
100
98
  def test_inline_properties_authorization(self):
101
- """AuthorizedAgents2 (inline_properties variant) requires properties and authorization_type."""
99
+ """AuthorizedAgents2 requires properties and authorization_type."""
102
100
  agent = AuthorizedAgents2(
103
101
  url="https://agent.example.com",
104
102
  authorized_for="All properties",
@@ -136,7 +134,7 @@ class TestAuthorizationDiscriminatedUnions:
136
134
  assert len(agent.properties) == 1
137
135
 
138
136
  def test_publisher_properties_authorization(self):
139
- """AuthorizedAgents3 (publisher_properties variant) requires publisher_properties and authorization_type."""
137
+ """AuthorizedAgents3 requires publisher_properties and type."""
140
138
  agent = AuthorizedAgents3(
141
139
  url="https://agent.example.com",
142
140
  authorized_for="All properties",
@@ -109,17 +109,20 @@ def test_client_types_are_exported():
109
109
 
110
110
  def test_public_api_types_are_pydantic_models():
111
111
  """Core types from public API are valid Pydantic models."""
112
- from adcp import Product, Format, MediaBuy, Property, BrandManifest
112
+ from adcp import BrandManifest, Format, MediaBuy, Product, Property
113
113
 
114
114
  types_to_test = [Product, Format, MediaBuy, Property, BrandManifest]
115
115
 
116
116
  for model_class in types_to_test:
117
117
  # Should have Pydantic model methods
118
- assert hasattr(model_class, "model_validate"), f"{model_class.__name__} missing model_validate"
119
- assert hasattr(model_class, "model_dump"), f"{model_class.__name__} missing model_dump"
120
- assert hasattr(model_class, "model_validate_json"), f"{model_class.__name__} missing model_validate_json"
121
- assert hasattr(model_class, "model_dump_json"), f"{model_class.__name__} missing model_dump_json"
122
- assert hasattr(model_class, "model_fields"), f"{model_class.__name__} missing model_fields"
118
+ name = model_class.__name__
119
+ assert hasattr(model_class, "model_validate"), f"{name} missing model_validate"
120
+ assert hasattr(model_class, "model_dump"), f"{name} missing model_dump"
121
+ assert hasattr(model_class, "model_validate_json"), (
122
+ f"{name} missing model_validate_json"
123
+ )
124
+ assert hasattr(model_class, "model_dump_json"), f"{name} missing model_dump_json"
125
+ assert hasattr(model_class, "model_fields"), f"{name} missing model_fields"
123
126
 
124
127
 
125
128
  def test_product_has_expected_public_fields():
@@ -158,26 +161,32 @@ def test_format_has_expected_public_fields():
158
161
 
159
162
  def test_pricing_options_are_discriminated_by_is_fixed():
160
163
  """Pricing option types have is_fixed discriminator field."""
161
- from adcp import CpmFixedRatePricingOption, CpmAuctionPricingOption, CpcPricingOption
164
+ from adcp import CpcPricingOption, CpmAuctionPricingOption, CpmFixedRatePricingOption
162
165
 
163
166
  # Fixed-rate options should have is_fixed discriminator
164
167
  fixed_types = [CpmFixedRatePricingOption, CpcPricingOption]
165
168
  for pricing_type in fixed_types:
166
- assert "is_fixed" in pricing_type.model_fields, f"{pricing_type.__name__} missing is_fixed discriminator"
169
+ name = pricing_type.__name__
170
+ assert "is_fixed" in pricing_type.model_fields, (
171
+ f"{name} missing is_fixed discriminator"
172
+ )
167
173
 
168
174
  # Auction options should have is_fixed discriminator
169
175
  auction_types = [CpmAuctionPricingOption]
170
176
  for pricing_type in auction_types:
171
- assert "is_fixed" in pricing_type.model_fields, f"{pricing_type.__name__} missing is_fixed discriminator"
177
+ name = pricing_type.__name__
178
+ assert "is_fixed" in pricing_type.model_fields, (
179
+ f"{name} missing is_fixed discriminator"
180
+ )
172
181
 
173
182
 
174
183
  def test_semantic_aliases_point_to_discriminated_variants():
175
184
  """Semantic aliases successfully construct their respective variants."""
176
185
  from adcp import (
177
- UrlPreviewRender,
178
- HtmlPreviewRender,
179
- CreateMediaBuySuccessResponse,
180
186
  CreateMediaBuyErrorResponse,
187
+ CreateMediaBuySuccessResponse,
188
+ HtmlPreviewRender,
189
+ UrlPreviewRender,
181
190
  )
182
191
 
183
192
  # URL preview render should accept url output format
@@ -27,6 +27,16 @@ from adcp import (
27
27
  UrlVastAsset,
28
28
  )
29
29
 
30
+ # Test that generated types still exist
31
+ from adcp.types._generated import (
32
+ ActivateSignalResponse1,
33
+ ActivateSignalResponse2,
34
+ BuildCreativeResponse1,
35
+ BuildCreativeResponse2,
36
+ CreateMediaBuyResponse1,
37
+ CreateMediaBuyResponse2,
38
+ )
39
+
30
40
  # Test that aliases can also be imported from the aliases module
31
41
  from adcp.types.aliases import (
32
42
  ActivateSignalErrorResponse as AliasActivateSignalErrorResponse,
@@ -47,16 +57,6 @@ from adcp.types.aliases import (
47
57
  CreateMediaBuySuccessResponse as AliasCreateMediaBuySuccessResponse,
48
58
  )
49
59
 
50
- # Test that generated types still exist
51
- from adcp.types._generated import (
52
- ActivateSignalResponse1,
53
- ActivateSignalResponse2,
54
- BuildCreativeResponse1,
55
- BuildCreativeResponse2,
56
- CreateMediaBuyResponse1,
57
- CreateMediaBuyResponse2,
58
- )
59
-
60
60
 
61
61
  def test_aliases_import():
62
62
  """Test that all aliases can be imported without errors."""
@@ -282,3 +282,117 @@ def test_semantic_aliases_can_be_imported_from_main_package():
282
282
  assert MainInlineDaastAsset is InlineDaastAsset
283
283
  assert MainMediaSubAsset is MediaSubAsset
284
284
  assert MainTextSubAsset is TextSubAsset
285
+
286
+
287
+ def test_package_type_aliases_imports():
288
+ """Test that Package type aliases can be imported."""
289
+ from adcp import CreatedPackageReference, Package
290
+ from adcp.types import CreatedPackageReference as TypesCreatedPackageReference
291
+ from adcp.types import Package as TypesPackage
292
+ from adcp.types.aliases import CreatedPackageReference as AliasCreatedPackageReference
293
+ from adcp.types.aliases import Package as AliasPackage
294
+
295
+ # Verify all import paths work
296
+ assert Package is TypesPackage
297
+ assert Package is AliasPackage
298
+ assert CreatedPackageReference is TypesCreatedPackageReference
299
+ assert CreatedPackageReference is AliasCreatedPackageReference
300
+
301
+
302
+ def test_package_type_aliases_point_to_correct_modules():
303
+ """Test that Package aliases point to the correct generated types."""
304
+ from adcp import CreatedPackageReference, Package
305
+ from adcp.types.generated_poc.create_media_buy_response import (
306
+ Package as ResponsePackage,
307
+ )
308
+ from adcp.types.generated_poc.package import Package as DomainPackage
309
+
310
+ # Package should point to the full domain package
311
+ assert Package is DomainPackage
312
+
313
+ # CreatedPackageReference should point to the response package
314
+ assert CreatedPackageReference is ResponsePackage
315
+
316
+ # Verify they're different types
317
+ assert Package is not CreatedPackageReference
318
+
319
+
320
+ def test_package_type_aliases_have_correct_fields():
321
+ """Test that Package type aliases have the expected fields."""
322
+ from adcp import CreatedPackageReference, Package
323
+
324
+ # Package should have all operational fields
325
+ package_fields = set(Package.__annotations__.keys())
326
+ expected_package_fields = {
327
+ "bid_price",
328
+ "budget",
329
+ "buyer_ref",
330
+ "creative_assignments",
331
+ "format_ids_to_provide",
332
+ "impressions",
333
+ "pacing",
334
+ "package_id",
335
+ "pricing_option_id",
336
+ "product_id",
337
+ "status",
338
+ "targeting_overlay",
339
+ }
340
+ assert package_fields == expected_package_fields, (
341
+ f"Package fields mismatch. "
342
+ f"Expected: {expected_package_fields}, Got: {package_fields}"
343
+ )
344
+
345
+ # CreatedPackageReference should only have IDs
346
+ created_fields = set(CreatedPackageReference.__annotations__.keys())
347
+ expected_created_fields = {"buyer_ref", "package_id"}
348
+ assert created_fields == expected_created_fields, (
349
+ f"CreatedPackageReference fields mismatch. "
350
+ f"Expected: {expected_created_fields}, Got: {created_fields}"
351
+ )
352
+
353
+
354
+ def test_package_type_aliases_in_exports():
355
+ """Test that Package type aliases are properly exported."""
356
+ import adcp
357
+ import adcp.types.aliases as aliases_module
358
+
359
+ # Check main package exports
360
+ assert hasattr(adcp, "Package")
361
+ assert hasattr(adcp, "CreatedPackageReference")
362
+ assert "Package" in adcp.__all__
363
+ assert "CreatedPackageReference" in adcp.__all__
364
+
365
+ # Check aliases module exports
366
+ assert hasattr(aliases_module, "Package")
367
+ assert hasattr(aliases_module, "CreatedPackageReference")
368
+ assert "Package" in aliases_module.__all__
369
+ assert "CreatedPackageReference" in aliases_module.__all__
370
+
371
+
372
+ def test_package_aliases_can_instantiate():
373
+ """Test that Package type aliases can be used to create instances."""
374
+ from adcp import CreatedPackageReference, Package
375
+ from adcp.types import PackageStatus
376
+
377
+ # Create a CreatedPackageReference (minimal fields)
378
+ created = CreatedPackageReference(buyer_ref="buyer-123", package_id="pkg-456")
379
+ assert created.buyer_ref == "buyer-123"
380
+ assert created.package_id == "pkg-456"
381
+
382
+ # Create a Package (all required fields)
383
+ pkg = Package(package_id="pkg-789", status=PackageStatus.draft)
384
+ assert pkg.package_id == "pkg-789"
385
+ assert pkg.status == PackageStatus.draft
386
+ assert pkg.buyer_ref is None # Optional field
387
+
388
+
389
+ def test_stable_package_export_is_full_package():
390
+ """Test that stable.py exports the Package as Package."""
391
+ from adcp.types.stable import Package as StablePackage
392
+
393
+ # Stable Package should be the full package
394
+ stable_fields = set(StablePackage.__annotations__.keys())
395
+ assert len(stable_fields) == 12, "Stable Package should have 12 fields (full package)"
396
+ assert "budget" in stable_fields
397
+ assert "pricing_option_id" in stable_fields
398
+ assert "product_id" in stable_fields
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -77,8 +77,8 @@ async def test_get_products():
77
77
  """Test get_products method with mock adapter."""
78
78
  from unittest.mock import patch
79
79
 
80
- from adcp.types.core import TaskResult, TaskStatus
81
80
  from adcp.types._generated import GetProductsRequest, GetProductsResponse
81
+ from adcp.types.core import TaskResult, TaskStatus
82
82
 
83
83
  config = AgentConfig(
84
84
  id="test_agent",
@@ -229,8 +229,8 @@ async def test_multi_agent_parallel_execution():
229
229
  """Test parallel execution across multiple agents."""
230
230
  from unittest.mock import patch
231
231
 
232
- from adcp.types.core import TaskResult, TaskStatus
233
232
  from adcp.types._generated import GetProductsRequest
233
+ from adcp.types.core import TaskResult, TaskStatus
234
234
 
235
235
  agents = [
236
236
  AgentConfig(
@@ -280,8 +280,8 @@ async def test_list_creative_formats_parses_mcp_response():
280
280
  import json
281
281
  from unittest.mock import patch
282
282
 
283
- from adcp.types.core import TaskResult, TaskStatus
284
283
  from adcp.types._generated import ListCreativeFormatsRequest, ListCreativeFormatsResponse
284
+ from adcp.types.core import TaskResult, TaskStatus
285
285
 
286
286
  config = AgentConfig(
287
287
  id="creative_agent",
@@ -330,8 +330,8 @@ async def test_list_creative_formats_parses_a2a_response():
330
330
  """Test that list_creative_formats parses A2A dict response into structured response."""
331
331
  from unittest.mock import patch
332
332
 
333
- from adcp.types.core import TaskResult, TaskStatus
334
333
  from adcp.types._generated import ListCreativeFormatsRequest, ListCreativeFormatsResponse
334
+ from adcp.types.core import TaskResult, TaskStatus
335
335
 
336
336
  config = AgentConfig(
337
337
  id="creative_agent",
@@ -374,8 +374,8 @@ async def test_list_creative_formats_handles_invalid_response():
374
374
  """Test that list_creative_formats handles invalid response gracefully."""
375
375
  from unittest.mock import patch
376
376
 
377
- from adcp.types.core import TaskResult, TaskStatus
378
377
  from adcp.types._generated import ListCreativeFormatsRequest
378
+ from adcp.types.core import TaskResult, TaskStatus
379
379
 
380
380
  config = AgentConfig(
381
381
  id="creative_agent",
File without changes
File without changes
@@ -6,7 +6,6 @@ import pytest
6
6
 
7
7
  from adcp import ADCPClient
8
8
  from adcp.types import AgentConfig, Protocol
9
- from adcp.types.core import TaskResult, TaskStatus
10
9
  from adcp.types._generated import (
11
10
  CreativeManifest,
12
11
  Format,
@@ -19,6 +18,7 @@ from adcp.types._generated import (
19
18
  PreviewCreativeResponse1,
20
19
  Product,
21
20
  )
21
+ from adcp.types.core import TaskResult, TaskStatus
22
22
  from adcp.utils.preview_cache import (
23
23
  PreviewURLGenerator,
24
24
  _create_sample_asset,
File without changes
File without changes
@@ -7,13 +7,13 @@ from unittest.mock import AsyncMock, patch
7
7
  import pytest
8
8
 
9
9
  from adcp.testing import test_agent
10
- from adcp.types.core import TaskResult, TaskStatus
11
10
  from adcp.types._generated import (
12
11
  GetProductsResponse,
13
12
  ListCreativeFormatsResponse,
14
13
  PreviewCreativeResponse1,
15
14
  Product,
16
15
  )
16
+ from adcp.types.core import TaskResult, TaskStatus
17
17
 
18
18
 
19
19
  @pytest.mark.asyncio