payi 0.1.0a84__tar.gz → 0.1.0a85__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 (208) hide show
  1. payi-0.1.0a85/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a84 → payi-0.1.0a85}/CHANGELOG.md +8 -0
  3. {payi-0.1.0a84 → payi-0.1.0a85}/PKG-INFO +1 -1
  4. {payi-0.1.0a84 → payi-0.1.0a85}/pyproject.toml +1 -1
  5. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_version.py +1 -1
  6. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/AnthropicInstrumentor.py +21 -3
  7. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/BedrockInstrumentor.py +1 -0
  8. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/GoogleGenAiInstrumentor.py +1 -0
  9. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/VertexInstrumentor.py +1 -0
  10. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/instrument.py +40 -10
  11. payi-0.1.0a84/.release-please-manifest.json +0 -3
  12. {payi-0.1.0a84 → payi-0.1.0a85}/.gitignore +0 -0
  13. {payi-0.1.0a84 → payi-0.1.0a85}/CONTRIBUTING.md +0 -0
  14. {payi-0.1.0a84 → payi-0.1.0a85}/LICENSE +0 -0
  15. {payi-0.1.0a84 → payi-0.1.0a85}/README.md +0 -0
  16. {payi-0.1.0a84 → payi-0.1.0a85}/SECURITY.md +0 -0
  17. {payi-0.1.0a84 → payi-0.1.0a85}/api.md +0 -0
  18. {payi-0.1.0a84 → payi-0.1.0a85}/bin/check-release-environment +0 -0
  19. {payi-0.1.0a84 → payi-0.1.0a85}/bin/publish-pypi +0 -0
  20. {payi-0.1.0a84 → payi-0.1.0a85}/examples/.keep +0 -0
  21. {payi-0.1.0a84 → payi-0.1.0a85}/mypy.ini +0 -0
  22. {payi-0.1.0a84 → payi-0.1.0a85}/noxfile.py +0 -0
  23. {payi-0.1.0a84 → payi-0.1.0a85}/release-please-config.json +0 -0
  24. {payi-0.1.0a84 → payi-0.1.0a85}/requirements-dev.lock +0 -0
  25. {payi-0.1.0a84 → payi-0.1.0a85}/requirements.lock +0 -0
  26. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/__init__.py +0 -0
  27. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_base_client.py +0 -0
  28. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_client.py +0 -0
  29. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_compat.py +0 -0
  30. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_constants.py +0 -0
  31. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_exceptions.py +0 -0
  32. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_files.py +0 -0
  33. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_models.py +0 -0
  34. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_qs.py +0 -0
  35. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_resource.py +0 -0
  36. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_response.py +0 -0
  37. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_streaming.py +0 -0
  38. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_types.py +0 -0
  39. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/__init__.py +0 -0
  40. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_logs.py +0 -0
  41. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_proxy.py +0 -0
  42. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_reflection.py +0 -0
  43. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_resources_proxy.py +0 -0
  44. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_streams.py +0 -0
  45. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_sync.py +0 -0
  46. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_transform.py +0 -0
  47. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_typing.py +0 -0
  48. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/_utils/_utils.py +0 -0
  49. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/.keep +0 -0
  50. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/OpenAIInstrumentor.py +0 -0
  51. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/Stopwatch.py +0 -0
  52. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/lib/helpers.py +0 -0
  53. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/pagination.py +0 -0
  54. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/py.typed +0 -0
  55. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/__init__.py +0 -0
  56. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/categories/__init__.py +0 -0
  57. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/categories/categories.py +0 -0
  58. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
  59. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/categories/resources.py +0 -0
  60. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/experiences/__init__.py +0 -0
  61. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/experiences/experiences.py +0 -0
  62. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/experiences/properties.py +0 -0
  63. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/experiences/types/__init__.py +0 -0
  64. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/experiences/types/limit_config.py +0 -0
  65. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/experiences/types/types.py +0 -0
  66. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/ingest.py +0 -0
  67. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/limits/__init__.py +0 -0
  68. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/limits/limits.py +0 -0
  69. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/limits/tags.py +0 -0
  70. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/requests/__init__.py +0 -0
  71. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/requests/properties.py +0 -0
  72. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/requests/requests.py +0 -0
  73. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/requests/result.py +0 -0
  74. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/__init__.py +0 -0
  75. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  76. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  77. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  78. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  79. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/definitions/version.py +0 -0
  80. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/kpis.py +0 -0
  81. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/properties.py +0 -0
  82. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/resources/use_cases/use_cases.py +0 -0
  83. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/__init__.py +0 -0
  84. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/bulk_ingest_response.py +0 -0
  85. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/categories/__init__.py +0 -0
  86. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
  87. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/categories/resource_create_params.py +0 -0
  88. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/categories/resource_list_params.py +0 -0
  89. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/category_delete_resource_response.py +0 -0
  90. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/category_delete_response.py +0 -0
  91. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/category_list_params.py +0 -0
  92. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/category_list_resources_params.py +0 -0
  93. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/category_resource_response.py +0 -0
  94. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/category_response.py +0 -0
  95. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/cost_data.py +0 -0
  96. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/cost_details.py +0 -0
  97. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/default_response.py +0 -0
  98. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experience_instance_response.py +0 -0
  99. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/__init__.py +0 -0
  100. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/experience_type.py +0 -0
  101. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/property_create_params.py +0 -0
  102. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/type_create_params.py +0 -0
  103. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/type_list_params.py +0 -0
  104. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/type_update_params.py +0 -0
  105. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/types/__init__.py +0 -0
  106. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/experiences/types/limit_config_create_params.py +0 -0
  107. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/ingest_bulk_params.py +0 -0
  108. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/ingest_event_param.py +0 -0
  109. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/ingest_response.py +0 -0
  110. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/ingest_units_params.py +0 -0
  111. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limit_create_params.py +0 -0
  112. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limit_history_response.py +0 -0
  113. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limit_list_params.py +0 -0
  114. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limit_list_response.py +0 -0
  115. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limit_reset_params.py +0 -0
  116. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limit_response.py +0 -0
  117. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limit_update_params.py +0 -0
  118. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/__init__.py +0 -0
  119. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/limit_tags.py +0 -0
  120. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_create_params.py +0 -0
  121. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_create_response.py +0 -0
  122. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_delete_response.py +0 -0
  123. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_list_response.py +0 -0
  124. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_remove_params.py +0 -0
  125. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_remove_response.py +0 -0
  126. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_update_params.py +0 -0
  127. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/limits/tag_update_response.py +0 -0
  128. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  129. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/requests/__init__.py +0 -0
  130. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/requests/property_create_params.py +0 -0
  131. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/requests/request_result.py +0 -0
  132. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/requests_data.py +0 -0
  133. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/__init__.py +0 -0
  134. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/evaluation_response.py +0 -0
  135. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/ingest_units.py +0 -0
  136. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  137. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  138. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/properties_response.py +0 -0
  139. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/xproxy_error.py +0 -0
  140. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared/xproxy_result.py +0 -0
  141. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared_params/__init__.py +0 -0
  142. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared_params/ingest_units.py +0 -0
  143. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  144. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/total_cost_data.py +0 -0
  145. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_case_instance_response.py +0 -0
  146. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/__init__.py +0 -0
  147. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definition_create_params.py +0 -0
  148. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definition_list_params.py +0 -0
  149. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definition_update_params.py +0 -0
  150. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  151. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  152. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  153. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  154. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  155. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  156. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  157. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  158. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  159. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  160. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/kpi_create_params.py +0 -0
  161. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  162. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  163. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  164. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/property_create_params.py +0 -0
  165. {payi-0.1.0a84 → payi-0.1.0a85}/src/payi/types/use_cases/use_case_definition.py +0 -0
  166. {payi-0.1.0a84 → payi-0.1.0a85}/tests/__init__.py +0 -0
  167. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/__init__.py +0 -0
  168. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/categories/__init__.py +0 -0
  169. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
  170. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/categories/test_resources.py +0 -0
  171. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/experiences/__init__.py +0 -0
  172. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/experiences/test_properties.py +0 -0
  173. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/experiences/test_types.py +0 -0
  174. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/experiences/types/__init__.py +0 -0
  175. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/experiences/types/test_limit_config.py +0 -0
  176. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/limits/__init__.py +0 -0
  177. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/limits/test_tags.py +0 -0
  178. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/requests/__init__.py +0 -0
  179. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/requests/test_properties.py +0 -0
  180. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/requests/test_result.py +0 -0
  181. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/test_categories.py +0 -0
  182. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/test_experiences.py +0 -0
  183. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/test_ingest.py +0 -0
  184. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/test_limits.py +0 -0
  185. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/test_use_cases.py +0 -0
  186. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/__init__.py +0 -0
  187. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  188. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  189. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  190. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  191. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/test_definitions.py +0 -0
  192. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/test_kpis.py +0 -0
  193. {payi-0.1.0a84 → payi-0.1.0a85}/tests/api_resources/use_cases/test_properties.py +0 -0
  194. {payi-0.1.0a84 → payi-0.1.0a85}/tests/conftest.py +0 -0
  195. {payi-0.1.0a84 → payi-0.1.0a85}/tests/sample_file.txt +0 -0
  196. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_client.py +0 -0
  197. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_deepcopy.py +0 -0
  198. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_extract_files.py +0 -0
  199. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_files.py +0 -0
  200. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_models.py +0 -0
  201. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_qs.py +0 -0
  202. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_required_args.py +0 -0
  203. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_response.py +0 -0
  204. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_streaming.py +0 -0
  205. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_transform.py +0 -0
  206. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_utils/test_proxy.py +0 -0
  207. {payi-0.1.0a84 → payi-0.1.0a85}/tests/test_utils/test_typing.py +0 -0
  208. {payi-0.1.0a84 → payi-0.1.0a85}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.85"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.85 (2025-06-12)
4
+
5
+ Full Changelog: [v0.1.0-alpha.84...v0.1.0-alpha.85](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.84...v0.1.0-alpha.85)
6
+
7
+ ### Features
8
+
9
+ * AnthropicBedrock ([#320](https://github.com/Pay-i/pay-i-python/issues/320)) ([33b42e3](https://github.com/Pay-i/pay-i-python/commit/33b42e38d7ba3245e0633254b4401cf991937933))
10
+
3
11
  ## 0.1.0-alpha.84 (2025-06-09)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.83...v0.1.0-alpha.84](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.83...v0.1.0-alpha.84)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a84
3
+ Version: 0.1.0a85
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.84"
3
+ version = "0.1.0-alpha.85"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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.84" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.85" # x-release-please-version
@@ -18,6 +18,12 @@ class AnthropicInstrumentor:
18
18
 
19
19
  return isinstance(instance._client, (AsyncAnthropicVertex, AnthropicVertex))
20
20
 
21
+ @staticmethod
22
+ def is_bedrock(instance: Any) -> bool:
23
+ from anthropic import AnthropicBedrock, AsyncAnthropicBedrock # type: ignore # noqa: I001
24
+
25
+ return isinstance(instance._client, (AsyncAnthropicBedrock, AnthropicBedrock))
26
+
21
27
  @staticmethod
22
28
  def instrument(instrumentor: _PayiInstrumentor) -> None:
23
29
  try:
@@ -126,10 +132,22 @@ async def astream_messages_wrapper(
126
132
 
127
133
  class _AnthropicProviderRequest(_ProviderRequest):
128
134
  def __init__(self, instrumentor: _PayiInstrumentor, streaming_type: _StreamingType, instance: Any = None) -> None:
129
- self._vertex: bool = AnthropicInstrumentor.is_vertex(instance)
135
+ self._is_vertex: bool = AnthropicInstrumentor.is_vertex(instance)
136
+ self._is_bedrock: bool = AnthropicInstrumentor.is_bedrock(instance)
137
+
138
+ category: str = ""
139
+ if self._is_vertex:
140
+ category = PayiCategories.google_vertex
141
+ elif self._is_bedrock:
142
+ category = PayiCategories.aws_bedrock
143
+ else:
144
+ category = PayiCategories.anthropic
145
+
146
+ instrumentor._logger.debug(f"Anthropic messages instrumenting category {category}")
147
+
130
148
  super().__init__(
131
149
  instrumentor=instrumentor,
132
- category=PayiCategories.google_vertex if self._vertex else PayiCategories.anthropic,
150
+ category=category,
133
151
  streaming_type=streaming_type,
134
152
  )
135
153
 
@@ -149,7 +167,7 @@ class _AnthropicProviderRequest(_ProviderRequest):
149
167
 
150
168
  @override
151
169
  def process_request(self, instance: Any, extra_headers: 'dict[str, str]', args: Sequence[Any], kwargs: Any) -> bool:
152
- self._ingest["resource"] = ("anthropic." if self._vertex else "") + kwargs.get("model", "")
170
+ self._ingest["resource"] = ("anthropic." if self._is_vertex else "") + kwargs.get("model", "")
153
171
 
154
172
  messages = kwargs.get("messages")
155
173
  if messages:
@@ -217,6 +217,7 @@ class _BedrockProviderRequest(_ProviderRequest):
217
217
  instrumentor=instrumentor,
218
218
  category=PayiCategories.aws_bedrock,
219
219
  streaming_type=_StreamingType.iterator,
220
+ is_aws_client=True,
220
221
  )
221
222
 
222
223
  @override
@@ -119,6 +119,7 @@ class _GoogleGenAiRequest(_ProviderRequest):
119
119
  instrumentor=instrumentor,
120
120
  category=PayiCategories.google_vertex,
121
121
  streaming_type=_StreamingType.generator,
122
+ is_google_vertex_or_genai_client=True,
122
123
  )
123
124
  self._prompt_character_count = 0
124
125
  self._candidates_character_count = 0
@@ -94,6 +94,7 @@ class _GoogleVertexRequest(_ProviderRequest):
94
94
  instrumentor=instrumentor,
95
95
  category=PayiCategories.google_vertex,
96
96
  streaming_type=_StreamingType.generator,
97
+ is_google_vertex_or_genai_client=True,
97
98
  )
98
99
  self._prompt_character_count = 0
99
100
  self._candidates_character_count = 0
@@ -35,12 +35,20 @@ class _ChunkResult:
35
35
  ingest: bool = False
36
36
 
37
37
  class _ProviderRequest:
38
- def __init__(self, instrumentor: '_PayiInstrumentor', category: str, streaming_type: '_StreamingType'):
38
+ def __init__(
39
+ self, instrumentor: '_PayiInstrumentor',
40
+ category: str,
41
+ streaming_type: '_StreamingType',
42
+ is_aws_client: Optional[bool] = None,
43
+ is_google_vertex_or_genai_client: Optional[bool] = None,
44
+ ) -> None:
39
45
  self._instrumentor: '_PayiInstrumentor' = instrumentor
40
46
  self._estimated_prompt_tokens: Optional[int] = None
41
47
  self._category: str = category
42
48
  self._ingest: IngestUnitsParams = { "category": category, "units": {} } # type: ignore
43
49
  self._streaming_type: '_StreamingType' = streaming_type
50
+ self._is_aws_client: Optional[bool] = is_aws_client
51
+ self._is_google_vertex_or_genai_client: Optional[bool] = is_google_vertex_or_genai_client
44
52
 
45
53
  def process_chunk(self, _chunk: Any) -> _ChunkResult:
46
54
  return _ChunkResult(send_chunk_to_caller=True)
@@ -59,20 +67,20 @@ class _ProviderRequest:
59
67
  pass
60
68
 
61
69
  @property
62
- def is_bedrock(self) -> bool:
63
- return self._category == PayiCategories.aws_bedrock
70
+ def is_aws_client(self) -> bool:
71
+ return self._is_aws_client if self._is_aws_client is not None else False
64
72
 
65
73
  @property
66
- def is_vertex(self) -> bool:
67
- return self._category == PayiCategories.google_vertex
68
-
74
+ def is_google_vertex_or_genai_client(self) -> bool:
75
+ return self._is_google_vertex_or_genai_client if self._is_google_vertex_or_genai_client is not None else False
76
+
69
77
  def process_exception(self, exception: Exception, kwargs: Any, ) -> bool: # noqa: ARG002
70
78
  self.exception_to_semantic_failure(exception)
71
79
  return True
72
80
 
73
81
  @property
74
82
  def supports_extra_headers(self) -> bool:
75
- return not self.is_bedrock and not self.is_vertex
83
+ return not self.is_aws_client and not self.is_google_vertex_or_genai_client
76
84
 
77
85
  @property
78
86
  def streaming_type(self) -> '_StreamingType':
@@ -286,6 +294,22 @@ class _PayiInstrumentor:
286
294
  except Exception as e:
287
295
  self._logger.error(f"Error instrumenting Google GenAi: {e}")
288
296
 
297
+ @staticmethod
298
+ def _create_logged_ingest_units(
299
+ ingest_units: IngestUnitsParams,
300
+ ) -> IngestUnitsParams:
301
+ # remove large and potentially sensitive data from the log
302
+ log_ingest_units: IngestUnitsParams = ingest_units.copy()
303
+
304
+ log_ingest_units.pop('provider_request_json', None)
305
+ log_ingest_units.pop('provider_response_json', None)
306
+
307
+ # Pop system.stack_trace from properties if it exists
308
+ if 'properties' in log_ingest_units and isinstance(log_ingest_units['properties'], dict):
309
+ log_ingest_units['properties'].pop('system.stack_trace', None)
310
+
311
+ return log_ingest_units
312
+
289
313
  def _process_ingest_units(self, ingest_units: IngestUnitsParams, log_data: 'dict[str, str]') -> bool:
290
314
  if int(ingest_units.get("http_status_code") or 0) < 400:
291
315
  units = ingest_units.get("units", {})
@@ -336,6 +360,9 @@ class _PayiInstrumentor:
336
360
  return None
337
361
 
338
362
  try:
363
+ if self._logger.isEnabledFor(logging.DEBUG):
364
+ self._logger.debug(f"_aingest_units: sending ({self._create_logged_ingest_units(ingest_units)})")
365
+
339
366
  if self._apayi:
340
367
  ingest_response = await self._apayi.ingest.units(**ingest_units)
341
368
  elif self._payi:
@@ -408,6 +435,9 @@ class _PayiInstrumentor:
408
435
 
409
436
  try:
410
437
  if self._payi:
438
+ if self._logger.isEnabledFor(logging.DEBUG):
439
+ self._logger.debug(f"_ingest_units: sending ({self._create_logged_ingest_units(ingest_units)})")
440
+
411
441
  ingest_response = self._payi.ingest.units(**ingest_units)
412
442
  self._logger.debug(f"_ingest_units: success ({ingest_response})")
413
443
 
@@ -906,7 +936,7 @@ class _PayiInstrumentor:
906
936
  request=request,
907
937
  )
908
938
 
909
- if request.is_bedrock:
939
+ if request.is_aws_client:
910
940
  if "body" in response:
911
941
  response["body"] = stream_result
912
942
  else:
@@ -1094,7 +1124,7 @@ class _StreamIteratorWrapper(ObjectProxy): # type: ignore
1094
1124
  request.process_initial_stream_response(response)
1095
1125
 
1096
1126
  bedrock_from_stream: bool = False
1097
- if request.is_bedrock:
1127
+ if request.is_aws_client:
1098
1128
  stream = response.get("stream", None)
1099
1129
 
1100
1130
  if stream:
@@ -1138,7 +1168,7 @@ class _StreamIteratorWrapper(ObjectProxy): # type: ignore
1138
1168
 
1139
1169
  def __iter__(self) -> Any:
1140
1170
  self._iter_started = True
1141
- if self._request.is_bedrock:
1171
+ if self._request.is_aws_client:
1142
1172
  # MUST reside in a separate function so that the yield statement (e.g. the generator) doesn't implicitly return its own iterator and overriding self
1143
1173
  self._instrumentor._logger.debug(f"StreamIteratorWrapper: bedrock __iter__")
1144
1174
  return self._iter_bedrock()
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.84"
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
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