payi 0.1.0a97__tar.gz → 0.1.0a99__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.

Potentially problematic release.


This version of payi might be problematic. Click here for more details.

Files changed (191) hide show
  1. payi-0.1.0a99/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a97 → payi-0.1.0a99}/CHANGELOG.md +33 -0
  3. {payi-0.1.0a97 → payi-0.1.0a99}/PKG-INFO +6 -5
  4. {payi-0.1.0a97 → payi-0.1.0a99}/README.md +3 -3
  5. {payi-0.1.0a97 → payi-0.1.0a99}/pyproject.toml +3 -2
  6. {payi-0.1.0a97 → payi-0.1.0a99}/requirements-dev.lock +2 -2
  7. {payi-0.1.0a97 → payi-0.1.0a99}/requirements.lock +2 -2
  8. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_base_client.py +9 -2
  9. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_models.py +8 -5
  10. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_version.py +1 -1
  11. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/AnthropicInstrumentor.py +7 -1
  12. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/BedrockInstrumentor.py +8 -0
  13. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/GoogleGenAiInstrumentor.py +8 -0
  14. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/OpenAIInstrumentor.py +8 -0
  15. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/VertexInstrumentor.py +8 -0
  16. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/VertexRequest.py +8 -1
  17. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/instrument.py +21 -8
  18. payi-0.1.0a99/src/payi/lib/version_helper.py +21 -0
  19. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_client.py +2 -2
  20. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_models.py +45 -0
  21. payi-0.1.0a97/.release-please-manifest.json +0 -3
  22. {payi-0.1.0a97 → payi-0.1.0a99}/.gitignore +0 -0
  23. {payi-0.1.0a97 → payi-0.1.0a99}/CONTRIBUTING.md +0 -0
  24. {payi-0.1.0a97 → payi-0.1.0a99}/LICENSE +0 -0
  25. {payi-0.1.0a97 → payi-0.1.0a99}/SECURITY.md +0 -0
  26. {payi-0.1.0a97 → payi-0.1.0a99}/api.md +0 -0
  27. {payi-0.1.0a97 → payi-0.1.0a99}/bin/check-release-environment +0 -0
  28. {payi-0.1.0a97 → payi-0.1.0a99}/bin/publish-pypi +0 -0
  29. {payi-0.1.0a97 → payi-0.1.0a99}/examples/.keep +0 -0
  30. {payi-0.1.0a97 → payi-0.1.0a99}/mypy.ini +0 -0
  31. {payi-0.1.0a97 → payi-0.1.0a99}/noxfile.py +0 -0
  32. {payi-0.1.0a97 → payi-0.1.0a99}/release-please-config.json +0 -0
  33. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/__init__.py +0 -0
  34. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_client.py +0 -0
  35. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_compat.py +0 -0
  36. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_constants.py +0 -0
  37. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_exceptions.py +0 -0
  38. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_files.py +0 -0
  39. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_qs.py +0 -0
  40. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_resource.py +0 -0
  41. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_response.py +0 -0
  42. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_streaming.py +0 -0
  43. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_types.py +0 -0
  44. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/__init__.py +0 -0
  45. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_logs.py +0 -0
  46. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_proxy.py +0 -0
  47. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_reflection.py +0 -0
  48. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_resources_proxy.py +0 -0
  49. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_streams.py +0 -0
  50. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_sync.py +0 -0
  51. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_transform.py +0 -0
  52. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_typing.py +0 -0
  53. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/_utils/_utils.py +0 -0
  54. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/.keep +0 -0
  55. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/Stopwatch.py +0 -0
  56. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/lib/helpers.py +0 -0
  57. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/pagination.py +0 -0
  58. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/py.typed +0 -0
  59. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/__init__.py +0 -0
  60. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/categories/__init__.py +0 -0
  61. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/categories/categories.py +0 -0
  62. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
  63. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/categories/resources.py +0 -0
  64. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/ingest.py +0 -0
  65. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/limits/__init__.py +0 -0
  66. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/limits/limits.py +0 -0
  67. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/limits/tags.py +0 -0
  68. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/requests/__init__.py +0 -0
  69. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/requests/properties.py +0 -0
  70. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/requests/requests.py +0 -0
  71. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/requests/result.py +0 -0
  72. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/__init__.py +0 -0
  73. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  74. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  75. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  76. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  77. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/definitions/version.py +0 -0
  78. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/kpis.py +0 -0
  79. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/properties.py +0 -0
  80. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/resources/use_cases/use_cases.py +0 -0
  81. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/__init__.py +0 -0
  82. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/bulk_ingest_response.py +0 -0
  83. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/categories/__init__.py +0 -0
  84. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
  85. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/categories/resource_create_params.py +0 -0
  86. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/categories/resource_list_params.py +0 -0
  87. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/category_delete_resource_response.py +0 -0
  88. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/category_delete_response.py +0 -0
  89. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/category_list_params.py +0 -0
  90. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/category_list_resources_params.py +0 -0
  91. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/category_resource_response.py +0 -0
  92. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/category_response.py +0 -0
  93. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/cost_data.py +0 -0
  94. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/cost_details.py +0 -0
  95. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/default_response.py +0 -0
  96. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/ingest_bulk_params.py +0 -0
  97. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/ingest_event_param.py +0 -0
  98. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/ingest_response.py +0 -0
  99. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/ingest_units_params.py +0 -0
  100. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limit_create_params.py +0 -0
  101. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limit_history_response.py +0 -0
  102. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limit_list_params.py +0 -0
  103. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limit_list_response.py +0 -0
  104. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limit_reset_params.py +0 -0
  105. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limit_response.py +0 -0
  106. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limit_update_params.py +0 -0
  107. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/__init__.py +0 -0
  108. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/limit_tags.py +0 -0
  109. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_create_params.py +0 -0
  110. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_create_response.py +0 -0
  111. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_delete_response.py +0 -0
  112. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_list_response.py +0 -0
  113. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_remove_params.py +0 -0
  114. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_remove_response.py +0 -0
  115. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_update_params.py +0 -0
  116. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/limits/tag_update_response.py +0 -0
  117. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  118. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/requests/__init__.py +0 -0
  119. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/requests/property_create_params.py +0 -0
  120. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/requests/request_result.py +0 -0
  121. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/requests_data.py +0 -0
  122. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/__init__.py +0 -0
  123. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/evaluation_response.py +0 -0
  124. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/ingest_units.py +0 -0
  125. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  126. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  127. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/properties_response.py +0 -0
  128. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/xproxy_error.py +0 -0
  129. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared/xproxy_result.py +0 -0
  130. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared_params/__init__.py +0 -0
  131. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared_params/ingest_units.py +0 -0
  132. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  133. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/total_cost_data.py +0 -0
  134. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_case_create_response.py +0 -0
  135. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_case_delete_response.py +0 -0
  136. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_case_retrieve_response.py +0 -0
  137. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/__init__.py +0 -0
  138. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definition_create_params.py +0 -0
  139. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definition_list_params.py +0 -0
  140. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definition_update_params.py +0 -0
  141. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  142. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  143. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  144. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  145. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  146. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  147. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  148. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  149. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  150. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  151. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  152. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  153. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  154. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/property_create_params.py +0 -0
  155. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/property_create_response.py +0 -0
  156. {payi-0.1.0a97 → payi-0.1.0a99}/src/payi/types/use_cases/use_case_definition.py +0 -0
  157. {payi-0.1.0a97 → payi-0.1.0a99}/tests/__init__.py +0 -0
  158. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/__init__.py +0 -0
  159. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/categories/__init__.py +0 -0
  160. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
  161. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/categories/test_resources.py +0 -0
  162. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/limits/__init__.py +0 -0
  163. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/limits/test_tags.py +0 -0
  164. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/requests/__init__.py +0 -0
  165. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/requests/test_properties.py +0 -0
  166. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/requests/test_result.py +0 -0
  167. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/test_categories.py +0 -0
  168. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/test_ingest.py +0 -0
  169. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/test_limits.py +0 -0
  170. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/test_use_cases.py +0 -0
  171. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/__init__.py +0 -0
  172. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  173. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  174. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  175. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  176. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/test_definitions.py +0 -0
  177. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/test_kpis.py +0 -0
  178. {payi-0.1.0a97 → payi-0.1.0a99}/tests/api_resources/use_cases/test_properties.py +0 -0
  179. {payi-0.1.0a97 → payi-0.1.0a99}/tests/conftest.py +0 -0
  180. {payi-0.1.0a97 → payi-0.1.0a99}/tests/sample_file.txt +0 -0
  181. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_deepcopy.py +0 -0
  182. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_extract_files.py +0 -0
  183. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_files.py +0 -0
  184. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_qs.py +0 -0
  185. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_required_args.py +0 -0
  186. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_response.py +0 -0
  187. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_streaming.py +0 -0
  188. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_transform.py +0 -0
  189. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_utils/test_proxy.py +0 -0
  190. {payi-0.1.0a97 → payi-0.1.0a99}/tests/test_utils/test_typing.py +0 -0
  191. {payi-0.1.0a97 → payi-0.1.0a99}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.99"
3
+ }
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.99 (2025-07-15)
4
+
5
+ Full Changelog: [v0.1.0-alpha.98...v0.1.0-alpha.99](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.98...v0.1.0-alpha.99)
6
+
7
+ ### Features
8
+
9
+ * clean up environment call outs ([4ec3d02](https://github.com/Pay-i/pay-i-python/commit/4ec3d02fb19859e8f8fd4454bc88aa96755e0b15))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **client:** don't send Content-Type header on GET requests ([26a0c6b](https://github.com/Pay-i/pay-i-python/commit/26a0c6be48e8ab1d7542f17afe51a65b92388212))
15
+
16
+ ## 0.1.0-alpha.98 (2025-07-11)
17
+
18
+ Full Changelog: [v0.1.0-alpha.97...v0.1.0-alpha.98](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.97...v0.1.0-alpha.98)
19
+
20
+ ### Features
21
+
22
+ * instrument provider module version ([9bc9596](https://github.com/Pay-i/pay-i-python/commit/9bc9596edb103b187dc468b9592d5e8a0c5f38f3))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **parsing:** correctly handle nested discriminated unions ([38be788](https://github.com/Pay-i/pay-i-python/commit/38be7889bf028750274f66a584e229a9578033eb))
28
+
29
+
30
+ ### Chores
31
+
32
+ * **internal:** bump pinned h11 dep ([9a1ef2e](https://github.com/Pay-i/pay-i-python/commit/9a1ef2efb18e5bd7e2e66a8176feefdc1c22ea22))
33
+ * **package:** mark python 3.13 as supported ([5ab6ac5](https://github.com/Pay-i/pay-i-python/commit/5ab6ac561585ffdc8ff1d07b06d873e0ef99a1ea))
34
+ * **readme:** fix version rendering on pypi ([3f91efc](https://github.com/Pay-i/pay-i-python/commit/3f91efc050e6ffcf97617f2b727c2f68fd83d91f))
35
+
3
36
  ## 0.1.0-alpha.97 (2025-07-08)
4
37
 
5
38
  Full Changelog: [v0.1.0-alpha.96...v0.1.0-alpha.97](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.96...v0.1.0-alpha.97)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a97
3
+ Version: 0.1.0a99
4
4
  Summary: The official Python library for the payi API
5
5
  Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
6
6
  Project-URL: Repository, https://github.com/Pay-i/pay-i-python
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
21
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
23
  Classifier: Typing :: Typed
23
24
  Requires-Python: >=3.8
@@ -32,12 +33,13 @@ Requires-Dist: typing-extensions<5,>=4.10
32
33
  Requires-Dist: wrapt>=1.17.2
33
34
  Provides-Extra: aiohttp
34
35
  Requires-Dist: aiohttp; extra == 'aiohttp'
35
- Requires-Dist: httpx-aiohttp>=0.1.6; extra == 'aiohttp'
36
+ Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
36
37
  Description-Content-Type: text/markdown
37
38
 
38
39
  # Payi Python API library
39
40
 
40
- [![PyPI version](https://github.com/Pay-i/pay-i-python/tree/main/<https://img.shields.io/pypi/v/payi.svg?label=pypi%20(stable)>)](https://pypi.org/project/payi/)
41
+ <!-- prettier-ignore -->
42
+ [![PyPI version](https://img.shields.io/pypi/v/payi.svg?label=pypi%20(stable))](https://pypi.org/project/payi/)
41
43
 
42
44
  The Payi Python library provides convenient access to the Payi REST API from any Python 3.8+
43
45
  application. The library includes type definitions for all request params and response fields,
@@ -121,7 +123,6 @@ pip install --pre payi[aiohttp]
121
123
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
122
124
 
123
125
  ```python
124
- import os
125
126
  import asyncio
126
127
  from payi import DefaultAioHttpClient
127
128
  from payi import AsyncPayi
@@ -129,7 +130,7 @@ from payi import AsyncPayi
129
130
 
130
131
  async def main() -> None:
131
132
  async with AsyncPayi(
132
- api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
133
+ api_key="My API Key",
133
134
  http_client=DefaultAioHttpClient(),
134
135
  ) as client:
135
136
  use_case_definition = await client.use_cases.definitions.create(
@@ -1,6 +1,7 @@
1
1
  # Payi Python API library
2
2
 
3
- [![PyPI version](<https://img.shields.io/pypi/v/payi.svg?label=pypi%20(stable)>)](https://pypi.org/project/payi/)
3
+ <!-- prettier-ignore -->
4
+ [![PyPI version](https://img.shields.io/pypi/v/payi.svg?label=pypi%20(stable))](https://pypi.org/project/payi/)
4
5
 
5
6
  The Payi Python library provides convenient access to the Payi REST API from any Python 3.8+
6
7
  application. The library includes type definitions for all request params and response fields,
@@ -84,7 +85,6 @@ pip install --pre payi[aiohttp]
84
85
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
85
86
 
86
87
  ```python
87
- import os
88
88
  import asyncio
89
89
  from payi import DefaultAioHttpClient
90
90
  from payi import AsyncPayi
@@ -92,7 +92,7 @@ from payi import AsyncPayi
92
92
 
93
93
  async def main() -> None:
94
94
  async with AsyncPayi(
95
- api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
95
+ api_key="My API Key",
96
96
  http_client=DefaultAioHttpClient(),
97
97
  ) as client:
98
98
  use_case_definition = await client.use_cases.definitions.create(
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.97"
3
+ version = "0.1.0-alpha.99"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -27,6 +27,7 @@ classifiers = [
27
27
  "Programming Language :: Python :: 3.10",
28
28
  "Programming Language :: Python :: 3.11",
29
29
  "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
30
31
  "Operating System :: OS Independent",
31
32
  "Operating System :: POSIX",
32
33
  "Operating System :: MacOS",
@@ -41,7 +42,7 @@ Homepage = "https://github.com/Pay-i/pay-i-python"
41
42
  Repository = "https://github.com/Pay-i/pay-i-python"
42
43
 
43
44
  [project.optional-dependencies]
44
- aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
45
+ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
45
46
 
46
47
  [tool.rye]
47
48
  managed = true
@@ -51,9 +51,9 @@ filelock==3.12.4
51
51
  frozenlist==1.6.2
52
52
  # via aiohttp
53
53
  # via aiosignal
54
- h11==0.14.0
54
+ h11==0.16.0
55
55
  # via httpcore
56
- httpcore==1.0.2
56
+ httpcore==1.0.9
57
57
  # via httpx
58
58
  httpx==0.28.1
59
59
  # via httpx-aiohttp
@@ -39,9 +39,9 @@ exceptiongroup==1.2.2
39
39
  frozenlist==1.6.2
40
40
  # via aiohttp
41
41
  # via aiosignal
42
- h11==0.14.0
42
+ h11==0.16.0
43
43
  # via httpcore
44
- httpcore==1.0.2
44
+ httpcore==1.0.9
45
45
  # via httpx
46
46
  httpx==0.28.1
47
47
  # via httpx-aiohttp
@@ -529,6 +529,15 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
529
529
  # work around https://github.com/encode/httpx/discussions/2880
530
530
  kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
531
531
 
532
+ is_body_allowed = options.method.lower() != "get"
533
+
534
+ if is_body_allowed:
535
+ kwargs["json"] = json_data if is_given(json_data) else None
536
+ kwargs["files"] = files
537
+ else:
538
+ headers.pop("Content-Type", None)
539
+ kwargs.pop("data", None)
540
+
532
541
  # TODO: report this error to httpx
533
542
  return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
534
543
  headers=headers,
@@ -540,8 +549,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
540
549
  # so that passing a `TypedDict` doesn't cause an error.
541
550
  # https://github.com/microsoft/pyright/issues/3526#event-6715453066
542
551
  params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
543
- json=json_data if is_given(json_data) else None,
544
- files=files,
545
552
  **kwargs,
546
553
  )
547
554
 
@@ -2,9 +2,10 @@ from __future__ import annotations
2
2
 
3
3
  import os
4
4
  import inspect
5
- from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
5
+ from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
6
6
  from datetime import date, datetime
7
7
  from typing_extensions import (
8
+ List,
8
9
  Unpack,
9
10
  Literal,
10
11
  ClassVar,
@@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
366
367
  if type_ is None:
367
368
  raise RuntimeError(f"Unexpected field type is None for {key}")
368
369
 
369
- return construct_type(value=value, type_=type_)
370
+ return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
370
371
 
371
372
 
372
373
  def is_basemodel(type_: type) -> bool:
@@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
420
421
  return cast(_T, construct_type(value=value, type_=type_))
421
422
 
422
423
 
423
- def construct_type(*, value: object, type_: object) -> object:
424
+ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
424
425
  """Loose coercion to the expected type with construction of nested values.
425
426
 
426
427
  If the given value does not match the expected type then it is returned as-is.
@@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
438
439
  type_ = type_.__value__ # type: ignore[unreachable]
439
440
 
440
441
  # unwrap `Annotated[T, ...]` -> `T`
441
- if is_annotated_type(type_):
442
- meta: tuple[Any, ...] = get_args(type_)[1:]
442
+ if metadata is not None:
443
+ meta: tuple[Any, ...] = tuple(metadata)
444
+ elif is_annotated_type(type_):
445
+ meta = get_args(type_)[1:]
443
446
  type_ = extract_type_arg(type_, 0)
444
447
  else:
445
448
  meta = tuple()
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "payi"
4
- __version__ = "0.1.0-alpha.97" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.99" # x-release-please-version
@@ -9,9 +9,13 @@ from payi.lib.helpers import PayiCategories
9
9
  from payi.types.ingest_units_params import Units
10
10
 
11
11
  from .instrument import _ChunkResult, _IsStreaming, _StreamingType, _ProviderRequest, _PayiInstrumentor
12
+ from .version_helper import get_version_helper
12
13
 
13
14
 
14
15
  class AnthropicInstrumentor:
16
+ _module_name: str = "anthropic"
17
+ _module_version: str = ""
18
+
15
19
  @staticmethod
16
20
  def is_vertex(instance: Any) -> bool:
17
21
  from anthropic import AnthropicVertex, AsyncAnthropicVertex # type: ignore # noqa: I001
@@ -27,7 +31,7 @@ class AnthropicInstrumentor:
27
31
  @staticmethod
28
32
  def instrument(instrumentor: _PayiInstrumentor) -> None:
29
33
  try:
30
- import anthropic # type: ignore # noqa: F401 I001
34
+ AnthropicInstrumentor._module_version = get_version_helper(AnthropicInstrumentor._module_name)
31
35
 
32
36
  wrap_function_wrapper(
33
37
  "anthropic.resources.messages",
@@ -149,6 +153,8 @@ class _AnthropicProviderRequest(_ProviderRequest):
149
153
  instrumentor=instrumentor,
150
154
  category=category,
151
155
  streaming_type=streaming_type,
156
+ module_name=AnthropicInstrumentor._module_name,
157
+ module_version=AnthropicInstrumentor._module_version,
152
158
  )
153
159
 
154
160
  @override
@@ -11,15 +11,21 @@ from payi.types.ingest_units_params import Units
11
11
  from payi.types.pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
12
12
 
13
13
  from .instrument import _ChunkResult, _IsStreaming, _StreamingType, _ProviderRequest, _PayiInstrumentor
14
+ from .version_helper import get_version_helper
14
15
 
15
16
 
16
17
  class BedrockInstrumentor:
18
+ _module_name: str = "boto3"
19
+ _module_version: str = ""
20
+
17
21
  _instrumentor: _PayiInstrumentor
18
22
 
19
23
  @staticmethod
20
24
  def instrument(instrumentor: _PayiInstrumentor) -> None:
21
25
  BedrockInstrumentor._instrumentor = instrumentor
22
26
 
27
+ BedrockInstrumentor._module_version = get_version_helper(BedrockInstrumentor._module_name)
28
+
23
29
  try:
24
30
  wrap_function_wrapper(
25
31
  "botocore.client",
@@ -234,6 +240,8 @@ class _BedrockProviderRequest(_ProviderRequest):
234
240
  instrumentor=instrumentor,
235
241
  category=PayiCategories.aws_bedrock,
236
242
  streaming_type=_StreamingType.iterator,
243
+ module_name=BedrockInstrumentor._module_name,
244
+ module_version=BedrockInstrumentor._module_version,
237
245
  is_aws_client=True,
238
246
  )
239
247
 
@@ -5,12 +5,18 @@ from wrapt import wrap_function_wrapper # type: ignore
5
5
 
6
6
  from .instrument import _ChunkResult, _IsStreaming, _PayiInstrumentor
7
7
  from .VertexRequest import _VertexRequest
8
+ from .version_helper import get_version_helper
8
9
 
9
10
 
10
11
  class GoogleGenAiInstrumentor:
12
+ _module_name: str = "google-genai"
13
+ _module_version: str = ""
14
+
11
15
  @staticmethod
12
16
  def instrument(instrumentor: _PayiInstrumentor) -> None:
13
17
  try:
18
+ GoogleGenAiInstrumentor._module_version = get_version_helper(GoogleGenAiInstrumentor._module_name)
19
+
14
20
  wrap_function_wrapper(
15
21
  "google.genai.models",
16
22
  "Models.generate_content",
@@ -115,6 +121,8 @@ class _GoogleGenAiRequest(_VertexRequest):
115
121
  def __init__(self, instrumentor: _PayiInstrumentor):
116
122
  super().__init__(
117
123
  instrumentor=instrumentor,
124
+ module_name=GoogleGenAiInstrumentor._module_name,
125
+ module_version=GoogleGenAiInstrumentor._module_version,
118
126
  )
119
127
  self._prompt_character_count = 0
120
128
  self._candidates_character_count = 0
@@ -10,9 +10,13 @@ from payi.lib.helpers import PayiCategories, PayiHeaderNames
10
10
  from payi.types.ingest_units_params import Units
11
11
 
12
12
  from .instrument import _ChunkResult, _IsStreaming, _StreamingType, _ProviderRequest, _PayiInstrumentor
13
+ from .version_helper import get_version_helper
13
14
 
14
15
 
15
16
  class OpenAiInstrumentor:
17
+ _module_name: str = "openai"
18
+ _module_version: str = ""
19
+
16
20
  @staticmethod
17
21
  def is_azure(instance: Any) -> bool:
18
22
  from openai import AzureOpenAI, AsyncAzureOpenAI # type: ignore # noqa: I001
@@ -22,6 +26,8 @@ class OpenAiInstrumentor:
22
26
  @staticmethod
23
27
  def instrument(instrumentor: _PayiInstrumentor) -> None:
24
28
  try:
29
+ OpenAiInstrumentor._module_version = get_version_helper(OpenAiInstrumentor._module_name)
30
+
25
31
  wrap_function_wrapper(
26
32
  "openai.resources.chat.completions",
27
33
  "Completions.create",
@@ -187,6 +193,8 @@ class _OpenAiProviderRequest(_ProviderRequest):
187
193
  instrumentor=instrumentor,
188
194
  category=PayiCategories.openai,
189
195
  streaming_type=_StreamingType.iterator,
196
+ module_name=OpenAiInstrumentor._module_name,
197
+ module_version=OpenAiInstrumentor._module_version,
190
198
  )
191
199
  self._input_tokens_key = input_tokens_key
192
200
  self._output_tokens_key = output_tokens_key
@@ -5,12 +5,18 @@ from wrapt import wrap_function_wrapper # type: ignore
5
5
 
6
6
  from .instrument import _ChunkResult, _IsStreaming, _PayiInstrumentor
7
7
  from .VertexRequest import _VertexRequest
8
+ from .version_helper import get_version_helper
8
9
 
9
10
 
10
11
  class VertexInstrumentor:
12
+ _module_name: str = "google-cloud-aiplatform"
13
+ _module_version: str = ""
14
+
11
15
  @staticmethod
12
16
  def instrument(instrumentor: _PayiInstrumentor) -> None:
13
17
  try:
18
+ VertexInstrumentor._module_version = get_version_helper(VertexInstrumentor._module_name)
19
+
14
20
  wrap_function_wrapper(
15
21
  "vertexai.generative_models",
16
22
  "GenerativeModel.generate_content",
@@ -85,6 +91,8 @@ class _GoogleVertexRequest(_VertexRequest):
85
91
  def __init__(self, instrumentor: _PayiInstrumentor):
86
92
  super().__init__(
87
93
  instrumentor=instrumentor,
94
+ module_name=VertexInstrumentor._module_name,
95
+ module_version=VertexInstrumentor._module_version,
88
96
  )
89
97
  self._prompt_character_count = 0
90
98
  self._candidates_character_count = 0
@@ -12,11 +12,18 @@ from .instrument import _ChunkResult, _StreamingType, _ProviderRequest, _PayiIns
12
12
  class _VertexRequest(_ProviderRequest): # type: ignore
13
13
  KNOWN_MODALITIES = ("VIDEO", "AUDIO", "TEXT", "VISION", "IMAGE")
14
14
 
15
- def __init__(self, instrumentor: _PayiInstrumentor):
15
+ def __init__(
16
+ self,
17
+ instrumentor: _PayiInstrumentor,
18
+ module_name: str,
19
+ module_version: str
20
+ ) -> None:
16
21
  super().__init__(
17
22
  instrumentor=instrumentor,
18
23
  category=PayiCategories.google_vertex,
19
24
  streaming_type=_StreamingType.generator,
25
+ module_name=module_name,
26
+ module_version=module_version,
20
27
  is_google_vertex_or_genai_client=True,
21
28
  )
22
29
  self._prompt_character_count = 0
@@ -37,13 +37,18 @@ class _ChunkResult:
37
37
 
38
38
  class _ProviderRequest:
39
39
  def __init__(
40
- self, instrumentor: '_PayiInstrumentor',
40
+ self,
41
+ instrumentor: '_PayiInstrumentor',
41
42
  category: str,
42
43
  streaming_type: '_StreamingType',
44
+ module_name: str,
45
+ module_version: str,
43
46
  is_aws_client: Optional[bool] = None,
44
47
  is_google_vertex_or_genai_client: Optional[bool] = None,
45
48
  ) -> None:
46
49
  self._instrumentor: '_PayiInstrumentor' = instrumentor
50
+ self._module_name: str = module_name
51
+ self._module_version: str = module_version
47
52
  self._estimated_prompt_tokens: Optional[int] = None
48
53
  self._category: str = category
49
54
  self._ingest: IngestUnitsParams = { "category": category, "units": {} } # type: ignore
@@ -205,6 +210,7 @@ class _InternalTrackContext:
205
210
 
206
211
  class _PayiInstrumentor:
207
212
  _not_instrumented: str = "<not_instrumented>"
213
+ _instrumented_module_header_name: str = "xProxy-Instrumented-Module"
208
214
 
209
215
  def __init__(
210
216
  self,
@@ -371,9 +377,15 @@ class _PayiInstrumentor:
371
377
 
372
378
  return log_ingest_units
373
379
 
374
- def _process_ingest_units(self, request: _ProviderRequest, log_data: 'dict[str, str]') -> None:
380
+ def _process_ingest_units(
381
+ self,
382
+ request: _ProviderRequest, log_data: 'dict[str, str]',
383
+ extra_headers: 'dict[str, str]') -> None:
375
384
  ingest_units = request._ingest
376
385
 
386
+ if request._module_version:
387
+ extra_headers[_PayiInstrumentor._instrumented_module_header_name] = f'{request._module_name}/{request._module_version}'
388
+
377
389
  if request._function_call_builder:
378
390
  # convert the function call builder to a list of function calls
379
391
  ingest_units["provider_response_function_calls"] = list(request._function_call_builder.values())
@@ -455,17 +467,18 @@ class _PayiInstrumentor:
455
467
 
456
468
  # return early if there are no units to ingest and on a successul ingest request
457
469
  log_data: 'dict[str,str]' = {}
470
+ extra_headers: 'dict[str, str]' = {}
458
471
 
459
- self._process_ingest_units(request, log_data)
472
+ self._process_ingest_units(request, log_data=log_data, extra_headers=extra_headers)
460
473
 
461
474
  try:
462
475
  if self._logger.isEnabledFor(logging.DEBUG):
463
476
  self._logger.debug(f"_aingest_units: sending ({self._create_logged_ingest_units(ingest_units)})")
464
477
 
465
478
  if self._apayi:
466
- ingest_response = await self._apayi.ingest.units(**ingest_units)
479
+ ingest_response = await self._apayi.ingest.units(**ingest_units, extra_headers=extra_headers)
467
480
  elif self._payi:
468
- ingest_response = self._payi.ingest.units(**ingest_units)
481
+ ingest_response = self._payi.ingest.units(**ingest_units, extra_headers=extra_headers)
469
482
  else:
470
483
  self._logger.error("No payi instance to ingest units")
471
484
  return XproxyError(code="configuration_error", message="No Payi or AsyncPayi instance configured for ingesting units")
@@ -572,15 +585,15 @@ class _PayiInstrumentor:
572
585
 
573
586
  # return early if there are no units to ingest and on a successul ingest request
574
587
  log_data: 'dict[str,str]' = {}
575
-
576
- self._process_ingest_units(request, log_data)
588
+ extra_headers: 'dict[str, str]' = {}
589
+ self._process_ingest_units(request, log_data=log_data, extra_headers=extra_headers)
577
590
 
578
591
  try:
579
592
  if self._payi:
580
593
  if self._logger.isEnabledFor(logging.DEBUG):
581
594
  self._logger.debug(f"_ingest_units: sending ({self._create_logged_ingest_units(ingest_units)})")
582
595
 
583
- ingest_response = self._payi.ingest.units(**ingest_units)
596
+ ingest_response = self._payi.ingest.units(**ingest_units, extra_headers=extra_headers)
584
597
  self._logger.debug(f"_ingest_units: success ({ingest_response})")
585
598
 
586
599
  self._process_ingest_units_response(ingest_response)
@@ -0,0 +1,21 @@
1
+ from importlib.metadata import version
2
+
3
+
4
+ def get_version_helper(module:str) -> str:
5
+ """
6
+ Get the version of the specified module.
7
+
8
+ Args:
9
+ module (str): The name of the module to query.
10
+
11
+ Returns:
12
+ str: The version of the module, or an empty string if not found.
13
+ """
14
+ try:
15
+ return version(module)
16
+ except Exception:
17
+ try:
18
+ imported_module = __import__(module)
19
+ return getattr(imported_module, "__version__", "")
20
+ except Exception:
21
+ return ""
@@ -456,7 +456,7 @@ class TestPayi:
456
456
  def test_multipart_repeating_array(self, client: Payi) -> None:
457
457
  request = client._build_request(
458
458
  FinalRequestOptions.construct(
459
- method="get",
459
+ method="post",
460
460
  url="/foo",
461
461
  headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
462
462
  json_data={"array": ["foo", "bar"]},
@@ -1259,7 +1259,7 @@ class TestAsyncPayi:
1259
1259
  def test_multipart_repeating_array(self, async_client: AsyncPayi) -> None:
1260
1260
  request = async_client._build_request(
1261
1261
  FinalRequestOptions.construct(
1262
- method="get",
1262
+ method="post",
1263
1263
  url="/foo",
1264
1264
  headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
1265
1265
  json_data={"array": ["foo", "bar"]},
@@ -889,3 +889,48 @@ def test_discriminated_union_case() -> None:
889
889
  )
890
890
 
891
891
  assert isinstance(m, ModelB)
892
+
893
+
894
+ def test_nested_discriminated_union() -> None:
895
+ class InnerType1(BaseModel):
896
+ type: Literal["type_1"]
897
+
898
+ class InnerModel(BaseModel):
899
+ inner_value: str
900
+
901
+ class InnerType2(BaseModel):
902
+ type: Literal["type_2"]
903
+ some_inner_model: InnerModel
904
+
905
+ class Type1(BaseModel):
906
+ base_type: Literal["base_type_1"]
907
+ value: Annotated[
908
+ Union[
909
+ InnerType1,
910
+ InnerType2,
911
+ ],
912
+ PropertyInfo(discriminator="type"),
913
+ ]
914
+
915
+ class Type2(BaseModel):
916
+ base_type: Literal["base_type_2"]
917
+
918
+ T = Annotated[
919
+ Union[
920
+ Type1,
921
+ Type2,
922
+ ],
923
+ PropertyInfo(discriminator="base_type"),
924
+ ]
925
+
926
+ model = construct_type(
927
+ type_=T,
928
+ value={
929
+ "base_type": "base_type_1",
930
+ "value": {
931
+ "type": "type_2",
932
+ },
933
+ },
934
+ )
935
+ assert isinstance(model, Type1)
936
+ assert isinstance(model.value, InnerType2)
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.97"
3
- }
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