payi 0.1.0a84__tar.gz → 0.1.0a86__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.0a86/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a84 → payi-0.1.0a86}/CHANGELOG.md +16 -0
  3. {payi-0.1.0a84 → payi-0.1.0a86}/PKG-INFO +1 -1
  4. {payi-0.1.0a84 → payi-0.1.0a86}/pyproject.toml +1 -1
  5. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_version.py +1 -1
  6. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/AnthropicInstrumentor.py +36 -5
  7. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/BedrockInstrumentor.py +1 -0
  8. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/GoogleGenAiInstrumentor.py +1 -0
  9. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/VertexInstrumentor.py +1 -0
  10. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/instrument.py +43 -11
  11. payi-0.1.0a84/.release-please-manifest.json +0 -3
  12. {payi-0.1.0a84 → payi-0.1.0a86}/.gitignore +0 -0
  13. {payi-0.1.0a84 → payi-0.1.0a86}/CONTRIBUTING.md +0 -0
  14. {payi-0.1.0a84 → payi-0.1.0a86}/LICENSE +0 -0
  15. {payi-0.1.0a84 → payi-0.1.0a86}/README.md +0 -0
  16. {payi-0.1.0a84 → payi-0.1.0a86}/SECURITY.md +0 -0
  17. {payi-0.1.0a84 → payi-0.1.0a86}/api.md +0 -0
  18. {payi-0.1.0a84 → payi-0.1.0a86}/bin/check-release-environment +0 -0
  19. {payi-0.1.0a84 → payi-0.1.0a86}/bin/publish-pypi +0 -0
  20. {payi-0.1.0a84 → payi-0.1.0a86}/examples/.keep +0 -0
  21. {payi-0.1.0a84 → payi-0.1.0a86}/mypy.ini +0 -0
  22. {payi-0.1.0a84 → payi-0.1.0a86}/noxfile.py +0 -0
  23. {payi-0.1.0a84 → payi-0.1.0a86}/release-please-config.json +0 -0
  24. {payi-0.1.0a84 → payi-0.1.0a86}/requirements-dev.lock +0 -0
  25. {payi-0.1.0a84 → payi-0.1.0a86}/requirements.lock +0 -0
  26. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/__init__.py +0 -0
  27. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_base_client.py +0 -0
  28. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_client.py +0 -0
  29. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_compat.py +0 -0
  30. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_constants.py +0 -0
  31. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_exceptions.py +0 -0
  32. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_files.py +0 -0
  33. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_models.py +0 -0
  34. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_qs.py +0 -0
  35. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_resource.py +0 -0
  36. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_response.py +0 -0
  37. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_streaming.py +0 -0
  38. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_types.py +0 -0
  39. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/__init__.py +0 -0
  40. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_logs.py +0 -0
  41. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_proxy.py +0 -0
  42. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_reflection.py +0 -0
  43. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_resources_proxy.py +0 -0
  44. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_streams.py +0 -0
  45. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_sync.py +0 -0
  46. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_transform.py +0 -0
  47. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_typing.py +0 -0
  48. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/_utils/_utils.py +0 -0
  49. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/.keep +0 -0
  50. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/OpenAIInstrumentor.py +0 -0
  51. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/Stopwatch.py +0 -0
  52. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/lib/helpers.py +0 -0
  53. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/pagination.py +0 -0
  54. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/py.typed +0 -0
  55. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/__init__.py +0 -0
  56. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/categories/__init__.py +0 -0
  57. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/categories/categories.py +0 -0
  58. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
  59. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/categories/resources.py +0 -0
  60. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/experiences/__init__.py +0 -0
  61. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/experiences/experiences.py +0 -0
  62. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/experiences/properties.py +0 -0
  63. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/experiences/types/__init__.py +0 -0
  64. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/experiences/types/limit_config.py +0 -0
  65. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/experiences/types/types.py +0 -0
  66. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/ingest.py +0 -0
  67. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/limits/__init__.py +0 -0
  68. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/limits/limits.py +0 -0
  69. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/limits/tags.py +0 -0
  70. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/requests/__init__.py +0 -0
  71. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/requests/properties.py +0 -0
  72. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/requests/requests.py +0 -0
  73. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/requests/result.py +0 -0
  74. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/__init__.py +0 -0
  75. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  76. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  77. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  78. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  79. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/definitions/version.py +0 -0
  80. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/kpis.py +0 -0
  81. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/properties.py +0 -0
  82. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/resources/use_cases/use_cases.py +0 -0
  83. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/__init__.py +0 -0
  84. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/bulk_ingest_response.py +0 -0
  85. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/categories/__init__.py +0 -0
  86. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
  87. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/categories/resource_create_params.py +0 -0
  88. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/categories/resource_list_params.py +0 -0
  89. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/category_delete_resource_response.py +0 -0
  90. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/category_delete_response.py +0 -0
  91. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/category_list_params.py +0 -0
  92. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/category_list_resources_params.py +0 -0
  93. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/category_resource_response.py +0 -0
  94. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/category_response.py +0 -0
  95. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/cost_data.py +0 -0
  96. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/cost_details.py +0 -0
  97. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/default_response.py +0 -0
  98. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experience_instance_response.py +0 -0
  99. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/__init__.py +0 -0
  100. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/experience_type.py +0 -0
  101. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/property_create_params.py +0 -0
  102. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/type_create_params.py +0 -0
  103. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/type_list_params.py +0 -0
  104. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/type_update_params.py +0 -0
  105. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/types/__init__.py +0 -0
  106. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/experiences/types/limit_config_create_params.py +0 -0
  107. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/ingest_bulk_params.py +0 -0
  108. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/ingest_event_param.py +0 -0
  109. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/ingest_response.py +0 -0
  110. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/ingest_units_params.py +0 -0
  111. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limit_create_params.py +0 -0
  112. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limit_history_response.py +0 -0
  113. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limit_list_params.py +0 -0
  114. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limit_list_response.py +0 -0
  115. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limit_reset_params.py +0 -0
  116. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limit_response.py +0 -0
  117. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limit_update_params.py +0 -0
  118. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/__init__.py +0 -0
  119. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/limit_tags.py +0 -0
  120. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_create_params.py +0 -0
  121. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_create_response.py +0 -0
  122. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_delete_response.py +0 -0
  123. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_list_response.py +0 -0
  124. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_remove_params.py +0 -0
  125. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_remove_response.py +0 -0
  126. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_update_params.py +0 -0
  127. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/limits/tag_update_response.py +0 -0
  128. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  129. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/requests/__init__.py +0 -0
  130. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/requests/property_create_params.py +0 -0
  131. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/requests/request_result.py +0 -0
  132. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/requests_data.py +0 -0
  133. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/__init__.py +0 -0
  134. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/evaluation_response.py +0 -0
  135. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/ingest_units.py +0 -0
  136. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  137. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  138. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/properties_response.py +0 -0
  139. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/xproxy_error.py +0 -0
  140. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared/xproxy_result.py +0 -0
  141. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared_params/__init__.py +0 -0
  142. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/shared_params/ingest_units.py +0 -0
  143. {payi-0.1.0a84 → payi-0.1.0a86}/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.0a86}/src/payi/types/total_cost_data.py +0 -0
  145. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_case_instance_response.py +0 -0
  146. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/__init__.py +0 -0
  147. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definition_create_params.py +0 -0
  148. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definition_list_params.py +0 -0
  149. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definition_update_params.py +0 -0
  150. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  151. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  152. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  153. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  154. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  155. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  156. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  157. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  158. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  159. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  160. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/kpi_create_params.py +0 -0
  161. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  162. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  163. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  164. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/property_create_params.py +0 -0
  165. {payi-0.1.0a84 → payi-0.1.0a86}/src/payi/types/use_cases/use_case_definition.py +0 -0
  166. {payi-0.1.0a84 → payi-0.1.0a86}/tests/__init__.py +0 -0
  167. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/__init__.py +0 -0
  168. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/categories/__init__.py +0 -0
  169. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
  170. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/categories/test_resources.py +0 -0
  171. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/experiences/__init__.py +0 -0
  172. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/experiences/test_properties.py +0 -0
  173. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/experiences/test_types.py +0 -0
  174. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/experiences/types/__init__.py +0 -0
  175. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/experiences/types/test_limit_config.py +0 -0
  176. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/limits/__init__.py +0 -0
  177. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/limits/test_tags.py +0 -0
  178. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/requests/__init__.py +0 -0
  179. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/requests/test_properties.py +0 -0
  180. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/requests/test_result.py +0 -0
  181. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/test_categories.py +0 -0
  182. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/test_experiences.py +0 -0
  183. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/test_ingest.py +0 -0
  184. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/test_limits.py +0 -0
  185. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/test_use_cases.py +0 -0
  186. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/__init__.py +0 -0
  187. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  188. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  189. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  190. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  191. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/test_definitions.py +0 -0
  192. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/test_kpis.py +0 -0
  193. {payi-0.1.0a84 → payi-0.1.0a86}/tests/api_resources/use_cases/test_properties.py +0 -0
  194. {payi-0.1.0a84 → payi-0.1.0a86}/tests/conftest.py +0 -0
  195. {payi-0.1.0a84 → payi-0.1.0a86}/tests/sample_file.txt +0 -0
  196. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_client.py +0 -0
  197. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_deepcopy.py +0 -0
  198. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_extract_files.py +0 -0
  199. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_files.py +0 -0
  200. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_models.py +0 -0
  201. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_qs.py +0 -0
  202. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_required_args.py +0 -0
  203. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_response.py +0 -0
  204. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_streaming.py +0 -0
  205. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_transform.py +0 -0
  206. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_utils/test_proxy.py +0 -0
  207. {payi-0.1.0a84 → payi-0.1.0a86}/tests/test_utils/test_typing.py +0 -0
  208. {payi-0.1.0a84 → payi-0.1.0a86}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.86"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.86 (2025-06-13)
4
+
5
+ Full Changelog: [v0.1.0-alpha.85...v0.1.0-alpha.86](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.85...v0.1.0-alpha.86)
6
+
7
+ ### Bug Fixes
8
+
9
+ * anthopic logging ([#322](https://github.com/Pay-i/pay-i-python/issues/322)) ([1af515b](https://github.com/Pay-i/pay-i-python/commit/1af515b9603058cf23b75e477fbb67e7acd405ad))
10
+
11
+ ## 0.1.0-alpha.85 (2025-06-12)
12
+
13
+ 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)
14
+
15
+ ### Features
16
+
17
+ * AnthropicBedrock ([#320](https://github.com/Pay-i/pay-i-python/issues/320)) ([33b42e3](https://github.com/Pay-i/pay-i-python/commit/33b42e38d7ba3245e0633254b4401cf991937933))
18
+
3
19
  ## 0.1.0-alpha.84 (2025-06-09)
4
20
 
5
21
  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.0a86
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.86"
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.86" # 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,9 @@ 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", "")
171
+
172
+ self._instrumentor._logger.debug(f"Processing anthropic request: model {self._ingest['resource']}, category {self._category}")
153
173
 
154
174
  messages = kwargs.get("messages")
155
175
  if messages:
@@ -225,6 +245,11 @@ def anthropic_process_chunk(request: _ProviderRequest, chunk: 'dict[str, Any]',
225
245
  if assign_id:
226
246
  request._ingest["provider_response_id"] = message.get('id', None)
227
247
 
248
+ model = message.get('model', None)
249
+ if model:
250
+ request._instrumentor._logger.debug(f"Anthropic streaming, reported model: {model}, instrumented model {request._ingest['resource']}")
251
+
252
+
228
253
  usage = message['usage']
229
254
  units = request._ingest["units"]
230
255
 
@@ -240,6 +265,8 @@ def anthropic_process_chunk(request: _ProviderRequest, chunk: 'dict[str, Any]',
240
265
  if text_cache_read > 0:
241
266
  units["text_cache_read"] = Units(input=text_cache_read, output=0)
242
267
 
268
+ request._instrumentor._logger.debug(f"Anthropic streaming captured {input} input tokens, ")
269
+
243
270
  elif type == "message_delta":
244
271
  usage = chunk.get('usage', {})
245
272
  ingest = True
@@ -247,12 +274,16 @@ def anthropic_process_chunk(request: _ProviderRequest, chunk: 'dict[str, Any]',
247
274
  # Web search will return an updated input tokens value at the end of streaming
248
275
  input_tokens = usage.get('input_tokens', None)
249
276
  if input_tokens is not None:
277
+ request._instrumentor._logger.debug(f"Anthropic streaming finished, updated input tokens: {input_tokens}")
250
278
  request._ingest["units"]["text"]["input"] = input_tokens
251
279
 
252
280
  request._ingest["units"]["text"]["output"] = usage.get('output_tokens', 0)
253
-
254
- return _ChunkResult(send_chunk_to_caller=True, ingest=ingest)
255
281
 
282
+ request._instrumentor._logger.debug(f"Anthropic streaming finished: output tokens {usage.get('output_tokens', 0)} ")
283
+ else:
284
+ request._instrumentor._logger.debug(f"Anthropic streaming chunk: {type}")
285
+
286
+ return _ChunkResult(send_chunk_to_caller=True, ingest=ingest)
256
287
 
257
288
  def anthropic_has_image_and_get_texts(request: _ProviderRequest, messages: Any) -> None:
258
289
  estimated_token_count = 0
@@ -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
@@ -16,7 +16,7 @@ from typing_extensions import deprecated
16
16
  import nest_asyncio # type: ignore
17
17
  from wrapt import ObjectProxy # type: ignore
18
18
 
19
- from payi import Payi, AsyncPayi
19
+ from payi import Payi, AsyncPayi, __version__ as _payi_version
20
20
  from payi.types import IngestUnitsParams
21
21
  from payi.lib.helpers import PayiHeaderNames
22
22
  from payi.types.ingest_response import IngestResponse
@@ -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':
@@ -174,6 +182,8 @@ class _PayiInstrumentor:
174
182
  global _g_logger
175
183
  self._logger: logging.Logger = logger if logger else _g_logger
176
184
 
185
+ self._logger.info(f"Pay-i instrumentor version: {_payi_version}")
186
+
177
187
  self._payi: Optional[Payi] = payi
178
188
  self._apayi: Optional[AsyncPayi] = apayi
179
189
 
@@ -286,6 +296,22 @@ class _PayiInstrumentor:
286
296
  except Exception as e:
287
297
  self._logger.error(f"Error instrumenting Google GenAi: {e}")
288
298
 
299
+ @staticmethod
300
+ def _create_logged_ingest_units(
301
+ ingest_units: IngestUnitsParams,
302
+ ) -> IngestUnitsParams:
303
+ # remove large and potentially sensitive data from the log
304
+ log_ingest_units: IngestUnitsParams = ingest_units.copy()
305
+
306
+ log_ingest_units.pop('provider_request_json', None)
307
+ log_ingest_units.pop('provider_response_json', None)
308
+
309
+ # Pop system.stack_trace from properties if it exists
310
+ if 'properties' in log_ingest_units and isinstance(log_ingest_units['properties'], dict):
311
+ log_ingest_units['properties'].pop('system.stack_trace', None)
312
+
313
+ return log_ingest_units
314
+
289
315
  def _process_ingest_units(self, ingest_units: IngestUnitsParams, log_data: 'dict[str, str]') -> bool:
290
316
  if int(ingest_units.get("http_status_code") or 0) < 400:
291
317
  units = ingest_units.get("units", {})
@@ -336,6 +362,9 @@ class _PayiInstrumentor:
336
362
  return None
337
363
 
338
364
  try:
365
+ if self._logger.isEnabledFor(logging.DEBUG):
366
+ self._logger.debug(f"_aingest_units: sending ({self._create_logged_ingest_units(ingest_units)})")
367
+
339
368
  if self._apayi:
340
369
  ingest_response = await self._apayi.ingest.units(**ingest_units)
341
370
  elif self._payi:
@@ -408,6 +437,9 @@ class _PayiInstrumentor:
408
437
 
409
438
  try:
410
439
  if self._payi:
440
+ if self._logger.isEnabledFor(logging.DEBUG):
441
+ self._logger.debug(f"_ingest_units: sending ({self._create_logged_ingest_units(ingest_units)})")
442
+
411
443
  ingest_response = self._payi.ingest.units(**ingest_units)
412
444
  self._logger.debug(f"_ingest_units: success ({ingest_response})")
413
445
 
@@ -906,7 +938,7 @@ class _PayiInstrumentor:
906
938
  request=request,
907
939
  )
908
940
 
909
- if request.is_bedrock:
941
+ if request.is_aws_client:
910
942
  if "body" in response:
911
943
  response["body"] = stream_result
912
944
  else:
@@ -1094,7 +1126,7 @@ class _StreamIteratorWrapper(ObjectProxy): # type: ignore
1094
1126
  request.process_initial_stream_response(response)
1095
1127
 
1096
1128
  bedrock_from_stream: bool = False
1097
- if request.is_bedrock:
1129
+ if request.is_aws_client:
1098
1130
  stream = response.get("stream", None)
1099
1131
 
1100
1132
  if stream:
@@ -1138,7 +1170,7 @@ class _StreamIteratorWrapper(ObjectProxy): # type: ignore
1138
1170
 
1139
1171
  def __iter__(self) -> Any:
1140
1172
  self._iter_started = True
1141
- if self._request.is_bedrock:
1173
+ if self._request.is_aws_client:
1142
1174
  # 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
1175
  self._instrumentor._logger.debug(f"StreamIteratorWrapper: bedrock __iter__")
1144
1176
  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