payi 0.1.0a96__tar.gz → 0.1.0a98__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.0a98/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a96 → payi-0.1.0a98}/CHANGELOG.md +24 -0
  3. {payi-0.1.0a96 → payi-0.1.0a98}/PKG-INFO +4 -2
  4. {payi-0.1.0a96 → payi-0.1.0a98}/README.md +2 -1
  5. {payi-0.1.0a96 → payi-0.1.0a98}/pyproject.toml +2 -1
  6. {payi-0.1.0a96 → payi-0.1.0a98}/requirements-dev.lock +2 -2
  7. {payi-0.1.0a96 → payi-0.1.0a98}/requirements.lock +2 -2
  8. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_models.py +8 -5
  9. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_version.py +1 -1
  10. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/AnthropicInstrumentor.py +7 -1
  11. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/BedrockInstrumentor.py +8 -0
  12. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/GoogleGenAiInstrumentor.py +8 -0
  13. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/OpenAIInstrumentor.py +8 -0
  14. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/VertexInstrumentor.py +8 -0
  15. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/VertexRequest.py +40 -7
  16. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/instrument.py +137 -41
  17. payi-0.1.0a98/src/payi/lib/version_helper.py +21 -0
  18. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_models.py +45 -0
  19. payi-0.1.0a96/.release-please-manifest.json +0 -3
  20. {payi-0.1.0a96 → payi-0.1.0a98}/.gitignore +0 -0
  21. {payi-0.1.0a96 → payi-0.1.0a98}/CONTRIBUTING.md +0 -0
  22. {payi-0.1.0a96 → payi-0.1.0a98}/LICENSE +0 -0
  23. {payi-0.1.0a96 → payi-0.1.0a98}/SECURITY.md +0 -0
  24. {payi-0.1.0a96 → payi-0.1.0a98}/api.md +0 -0
  25. {payi-0.1.0a96 → payi-0.1.0a98}/bin/check-release-environment +0 -0
  26. {payi-0.1.0a96 → payi-0.1.0a98}/bin/publish-pypi +0 -0
  27. {payi-0.1.0a96 → payi-0.1.0a98}/examples/.keep +0 -0
  28. {payi-0.1.0a96 → payi-0.1.0a98}/mypy.ini +0 -0
  29. {payi-0.1.0a96 → payi-0.1.0a98}/noxfile.py +0 -0
  30. {payi-0.1.0a96 → payi-0.1.0a98}/release-please-config.json +0 -0
  31. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/__init__.py +0 -0
  32. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_base_client.py +0 -0
  33. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_client.py +0 -0
  34. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_compat.py +0 -0
  35. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_constants.py +0 -0
  36. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_exceptions.py +0 -0
  37. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_files.py +0 -0
  38. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_qs.py +0 -0
  39. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_resource.py +0 -0
  40. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_response.py +0 -0
  41. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_streaming.py +0 -0
  42. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_types.py +0 -0
  43. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/__init__.py +0 -0
  44. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_logs.py +0 -0
  45. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_proxy.py +0 -0
  46. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_reflection.py +0 -0
  47. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_resources_proxy.py +0 -0
  48. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_streams.py +0 -0
  49. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_sync.py +0 -0
  50. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_transform.py +0 -0
  51. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_typing.py +0 -0
  52. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_utils.py +0 -0
  53. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/.keep +0 -0
  54. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/Stopwatch.py +0 -0
  55. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/helpers.py +0 -0
  56. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/pagination.py +0 -0
  57. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/py.typed +0 -0
  58. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/__init__.py +0 -0
  59. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/__init__.py +0 -0
  60. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/categories.py +0 -0
  61. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
  62. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/resources.py +0 -0
  63. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/ingest.py +0 -0
  64. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/limits/__init__.py +0 -0
  65. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/limits/limits.py +0 -0
  66. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/limits/tags.py +0 -0
  67. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/__init__.py +0 -0
  68. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/properties.py +0 -0
  69. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/requests.py +0 -0
  70. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/result.py +0 -0
  71. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/__init__.py +0 -0
  72. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  73. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  74. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  75. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  76. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/version.py +0 -0
  77. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/kpis.py +0 -0
  78. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/properties.py +0 -0
  79. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/use_cases.py +0 -0
  80. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/__init__.py +0 -0
  81. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/bulk_ingest_response.py +0 -0
  82. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/__init__.py +0 -0
  83. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
  84. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/resource_create_params.py +0 -0
  85. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/resource_list_params.py +0 -0
  86. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_delete_resource_response.py +0 -0
  87. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_delete_response.py +0 -0
  88. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_list_params.py +0 -0
  89. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_list_resources_params.py +0 -0
  90. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_resource_response.py +0 -0
  91. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_response.py +0 -0
  92. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/cost_data.py +0 -0
  93. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/cost_details.py +0 -0
  94. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/default_response.py +0 -0
  95. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_bulk_params.py +0 -0
  96. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_event_param.py +0 -0
  97. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_response.py +0 -0
  98. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_units_params.py +0 -0
  99. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_create_params.py +0 -0
  100. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_history_response.py +0 -0
  101. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_list_params.py +0 -0
  102. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_list_response.py +0 -0
  103. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_reset_params.py +0 -0
  104. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_response.py +0 -0
  105. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_update_params.py +0 -0
  106. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/__init__.py +0 -0
  107. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/limit_tags.py +0 -0
  108. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_create_params.py +0 -0
  109. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_create_response.py +0 -0
  110. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_delete_response.py +0 -0
  111. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_list_response.py +0 -0
  112. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_remove_params.py +0 -0
  113. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_remove_response.py +0 -0
  114. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_update_params.py +0 -0
  115. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_update_response.py +0 -0
  116. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  117. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests/__init__.py +0 -0
  118. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests/property_create_params.py +0 -0
  119. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests/request_result.py +0 -0
  120. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests_data.py +0 -0
  121. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/__init__.py +0 -0
  122. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/evaluation_response.py +0 -0
  123. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/ingest_units.py +0 -0
  124. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  125. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  126. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/properties_response.py +0 -0
  127. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/xproxy_error.py +0 -0
  128. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/xproxy_result.py +0 -0
  129. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared_params/__init__.py +0 -0
  130. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared_params/ingest_units.py +0 -0
  131. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  132. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/total_cost_data.py +0 -0
  133. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_case_create_response.py +0 -0
  134. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_case_delete_response.py +0 -0
  135. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_case_retrieve_response.py +0 -0
  136. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/__init__.py +0 -0
  137. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definition_create_params.py +0 -0
  138. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definition_list_params.py +0 -0
  139. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definition_update_params.py +0 -0
  140. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  141. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  142. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  143. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  144. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  145. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  146. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  147. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  148. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  149. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  150. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  151. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  152. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  153. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/property_create_params.py +0 -0
  154. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/property_create_response.py +0 -0
  155. {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/use_case_definition.py +0 -0
  156. {payi-0.1.0a96 → payi-0.1.0a98}/tests/__init__.py +0 -0
  157. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/__init__.py +0 -0
  158. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/categories/__init__.py +0 -0
  159. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
  160. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/categories/test_resources.py +0 -0
  161. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/limits/__init__.py +0 -0
  162. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/limits/test_tags.py +0 -0
  163. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/requests/__init__.py +0 -0
  164. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/requests/test_properties.py +0 -0
  165. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/requests/test_result.py +0 -0
  166. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_categories.py +0 -0
  167. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_ingest.py +0 -0
  168. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_limits.py +0 -0
  169. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_use_cases.py +0 -0
  170. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/__init__.py +0 -0
  171. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  172. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  173. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  174. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  175. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/test_definitions.py +0 -0
  176. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/test_kpis.py +0 -0
  177. {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/test_properties.py +0 -0
  178. {payi-0.1.0a96 → payi-0.1.0a98}/tests/conftest.py +0 -0
  179. {payi-0.1.0a96 → payi-0.1.0a98}/tests/sample_file.txt +0 -0
  180. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_client.py +0 -0
  181. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_deepcopy.py +0 -0
  182. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_extract_files.py +0 -0
  183. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_files.py +0 -0
  184. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_qs.py +0 -0
  185. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_required_args.py +0 -0
  186. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_response.py +0 -0
  187. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_streaming.py +0 -0
  188. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_transform.py +0 -0
  189. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_utils/test_proxy.py +0 -0
  190. {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_utils/test_typing.py +0 -0
  191. {payi-0.1.0a96 → payi-0.1.0a98}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.98"
3
+ }
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.98 (2025-07-11)
4
+
5
+ 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)
6
+
7
+ ### Features
8
+
9
+ * instrument provider module version ([9bc9596](https://github.com/Pay-i/pay-i-python/commit/9bc9596edb103b187dc468b9592d5e8a0c5f38f3))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **parsing:** correctly handle nested discriminated unions ([38be788](https://github.com/Pay-i/pay-i-python/commit/38be7889bf028750274f66a584e229a9578033eb))
15
+
16
+
17
+ ### Chores
18
+
19
+ * **internal:** bump pinned h11 dep ([9a1ef2e](https://github.com/Pay-i/pay-i-python/commit/9a1ef2efb18e5bd7e2e66a8176feefdc1c22ea22))
20
+ * **package:** mark python 3.13 as supported ([5ab6ac5](https://github.com/Pay-i/pay-i-python/commit/5ab6ac561585ffdc8ff1d07b06d873e0ef99a1ea))
21
+ * **readme:** fix version rendering on pypi ([3f91efc](https://github.com/Pay-i/pay-i-python/commit/3f91efc050e6ffcf97617f2b727c2f68fd83d91f))
22
+
23
+ ## 0.1.0-alpha.97 (2025-07-08)
24
+
25
+ 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)
26
+
3
27
  ## 0.1.0-alpha.96 (2025-07-07)
4
28
 
5
29
  Full Changelog: [v0.1.0-alpha.95...v0.1.0-alpha.96](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.95...v0.1.0-alpha.96)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a96
3
+ Version: 0.1.0a98
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
@@ -37,7 +38,8 @@ 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,
@@ -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,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.96"
3
+ version = "0.1.0-alpha.98"
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",
@@ -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
@@ -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.96" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.98" # 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
@@ -10,11 +10,20 @@ from .instrument import _ChunkResult, _StreamingType, _ProviderRequest, _PayiIns
10
10
 
11
11
 
12
12
  class _VertexRequest(_ProviderRequest): # type: ignore
13
- def __init__(self, instrumentor: _PayiInstrumentor):
13
+ KNOWN_MODALITIES = ("VIDEO", "AUDIO", "TEXT", "VISION", "IMAGE")
14
+
15
+ def __init__(
16
+ self,
17
+ instrumentor: _PayiInstrumentor,
18
+ module_name: str,
19
+ module_version: str
20
+ ) -> None:
14
21
  super().__init__(
15
22
  instrumentor=instrumentor,
16
23
  category=PayiCategories.google_vertex,
17
24
  streaming_type=_StreamingType.generator,
25
+ module_name=module_name,
26
+ module_version=module_version,
18
27
  is_google_vertex_or_genai_client=True,
19
28
  )
20
29
  self._prompt_character_count = 0
@@ -154,6 +163,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
154
163
 
155
164
  prompt_tokens_details: list[dict[str, Any]] = usage.get("prompt_tokens_details", [])
156
165
  candidates_tokens_details: list[dict[str, Any]] = usage.get("candidates_tokens_details", [])
166
+ cache_tokens_details: list[dict[str, Any]] = usage.get("cache_tokens_details", [])
157
167
 
158
168
  if not model:
159
169
  model = ""
@@ -214,27 +224,50 @@ class _VertexRequest(_ProviderRequest): # type: ignore
214
224
  if is_large_context_token_model(model, input):
215
225
  large_context = "_large_context"
216
226
 
227
+ cache_details: dict[str, int] = {}
228
+
229
+ for details in cache_tokens_details:
230
+ modality = details.get("modality", "")
231
+ if not modality:
232
+ continue
233
+
234
+ modality_token_count = details.get("token_count", 0)
235
+
236
+ if modality == "IMAGE":
237
+ modality = "VISION"
238
+
239
+ if modality in _VertexRequest.KNOWN_MODALITIES:
240
+ cache_details[modality] = modality_token_count
241
+ add_units(self, modality.lower() + "_cache_read" + large_context, input=modality_token_count)
242
+
217
243
  for details in prompt_tokens_details:
218
244
  modality = details.get("modality", "")
219
245
  if not modality:
220
246
  continue
221
247
 
222
248
  modality_token_count = details.get("token_count", 0)
249
+
223
250
  if modality == "IMAGE":
224
- add_units(self, "vision"+large_context, input=modality_token_count)
225
- elif modality in ("VIDEO", "AUDIO", "TEXT"):
226
- add_units(self, modality.lower()+large_context, input=modality_token_count)
251
+ modality = "VISION"
252
+
253
+ if modality in _VertexRequest.KNOWN_MODALITIES:
254
+ # Subtract cache_details value if modality is present, floor at zero
255
+ if modality in cache_details:
256
+ modality_token_count = max(0, modality_token_count - cache_details[modality])
257
+
258
+ add_units(self, modality.lower() + large_context, input=modality_token_count)
259
+
227
260
  for details in candidates_tokens_details:
228
261
  modality = details.get("modality", "")
229
262
  if not modality:
230
263
  continue
231
264
 
232
265
  modality_token_count = details.get("token_count", 0)
233
- if modality in ("VIDEO", "AUDIO", "TEXT", "IMAGE"):
234
- add_units(self, modality.lower()+large_context, output=modality_token_count)
266
+ if modality in _VertexRequest.KNOWN_MODALITIES:
267
+ add_units(self, modality.lower() + large_context, output=modality_token_count)
235
268
 
236
269
  if thinking_token_count > 0:
237
- add_units(self, "reasoning"+large_context, output=thinking_token_count)
270
+ add_units(self, "reasoning" + large_context, output=thinking_token_count)
238
271
 
239
272
  if not self._ingest["units"]:
240
273
  input = usage.get("prompt_token_count", 0)