payi 0.1.0a90__tar.gz → 0.1.0a92__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 (209) hide show
  1. payi-0.1.0a92/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a90 → payi-0.1.0a92}/CHANGELOG.md +27 -0
  3. {payi-0.1.0a90 → payi-0.1.0a92}/PKG-INFO +1 -1
  4. {payi-0.1.0a90 → payi-0.1.0a92}/bin/check-release-environment +1 -1
  5. {payi-0.1.0a90 → payi-0.1.0a92}/pyproject.toml +1 -1
  6. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_version.py +1 -1
  7. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/AnthropicInstrumentor.py +32 -1
  8. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/BedrockInstrumentor.py +18 -0
  9. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/OpenAIInstrumentor.py +47 -3
  10. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/VertexRequest.py +17 -1
  11. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/instrument.py +20 -0
  12. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_client.py +2 -0
  13. payi-0.1.0a90/.release-please-manifest.json +0 -3
  14. {payi-0.1.0a90 → payi-0.1.0a92}/.gitignore +0 -0
  15. {payi-0.1.0a90 → payi-0.1.0a92}/CONTRIBUTING.md +0 -0
  16. {payi-0.1.0a90 → payi-0.1.0a92}/LICENSE +0 -0
  17. {payi-0.1.0a90 → payi-0.1.0a92}/README.md +0 -0
  18. {payi-0.1.0a90 → payi-0.1.0a92}/SECURITY.md +0 -0
  19. {payi-0.1.0a90 → payi-0.1.0a92}/api.md +0 -0
  20. {payi-0.1.0a90 → payi-0.1.0a92}/bin/publish-pypi +0 -0
  21. {payi-0.1.0a90 → payi-0.1.0a92}/examples/.keep +0 -0
  22. {payi-0.1.0a90 → payi-0.1.0a92}/mypy.ini +0 -0
  23. {payi-0.1.0a90 → payi-0.1.0a92}/noxfile.py +0 -0
  24. {payi-0.1.0a90 → payi-0.1.0a92}/release-please-config.json +0 -0
  25. {payi-0.1.0a90 → payi-0.1.0a92}/requirements-dev.lock +0 -0
  26. {payi-0.1.0a90 → payi-0.1.0a92}/requirements.lock +0 -0
  27. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/__init__.py +0 -0
  28. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_base_client.py +0 -0
  29. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_client.py +0 -0
  30. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_compat.py +0 -0
  31. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_constants.py +0 -0
  32. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_exceptions.py +0 -0
  33. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_files.py +0 -0
  34. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_models.py +0 -0
  35. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_qs.py +0 -0
  36. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_resource.py +0 -0
  37. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_response.py +0 -0
  38. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_streaming.py +0 -0
  39. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_types.py +0 -0
  40. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/__init__.py +0 -0
  41. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_logs.py +0 -0
  42. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_proxy.py +0 -0
  43. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_reflection.py +0 -0
  44. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_resources_proxy.py +0 -0
  45. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_streams.py +0 -0
  46. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_sync.py +0 -0
  47. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_transform.py +0 -0
  48. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_typing.py +0 -0
  49. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/_utils/_utils.py +0 -0
  50. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/.keep +0 -0
  51. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/GoogleGenAiInstrumentor.py +0 -0
  52. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/Stopwatch.py +0 -0
  53. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/VertexInstrumentor.py +0 -0
  54. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/lib/helpers.py +0 -0
  55. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/pagination.py +0 -0
  56. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/py.typed +0 -0
  57. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/__init__.py +0 -0
  58. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/categories/__init__.py +0 -0
  59. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/categories/categories.py +0 -0
  60. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
  61. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/categories/resources.py +0 -0
  62. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/experiences/__init__.py +0 -0
  63. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/experiences/experiences.py +0 -0
  64. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/experiences/properties.py +0 -0
  65. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/experiences/types/__init__.py +0 -0
  66. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/experiences/types/limit_config.py +0 -0
  67. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/experiences/types/types.py +0 -0
  68. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/ingest.py +0 -0
  69. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/limits/__init__.py +0 -0
  70. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/limits/limits.py +0 -0
  71. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/limits/tags.py +0 -0
  72. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/requests/__init__.py +0 -0
  73. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/requests/properties.py +0 -0
  74. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/requests/requests.py +0 -0
  75. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/requests/result.py +0 -0
  76. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/__init__.py +0 -0
  77. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  78. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  79. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  80. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  81. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/definitions/version.py +0 -0
  82. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/kpis.py +0 -0
  83. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/properties.py +0 -0
  84. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/resources/use_cases/use_cases.py +0 -0
  85. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/__init__.py +0 -0
  86. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/bulk_ingest_response.py +0 -0
  87. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/categories/__init__.py +0 -0
  88. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
  89. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/categories/resource_create_params.py +0 -0
  90. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/categories/resource_list_params.py +0 -0
  91. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/category_delete_resource_response.py +0 -0
  92. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/category_delete_response.py +0 -0
  93. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/category_list_params.py +0 -0
  94. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/category_list_resources_params.py +0 -0
  95. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/category_resource_response.py +0 -0
  96. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/category_response.py +0 -0
  97. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/cost_data.py +0 -0
  98. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/cost_details.py +0 -0
  99. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/default_response.py +0 -0
  100. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experience_instance_response.py +0 -0
  101. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/__init__.py +0 -0
  102. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/experience_type.py +0 -0
  103. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/property_create_params.py +0 -0
  104. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/type_create_params.py +0 -0
  105. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/type_list_params.py +0 -0
  106. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/type_update_params.py +0 -0
  107. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/types/__init__.py +0 -0
  108. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/experiences/types/limit_config_create_params.py +0 -0
  109. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/ingest_bulk_params.py +0 -0
  110. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/ingest_event_param.py +0 -0
  111. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/ingest_response.py +0 -0
  112. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/ingest_units_params.py +0 -0
  113. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limit_create_params.py +0 -0
  114. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limit_history_response.py +0 -0
  115. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limit_list_params.py +0 -0
  116. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limit_list_response.py +0 -0
  117. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limit_reset_params.py +0 -0
  118. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limit_response.py +0 -0
  119. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limit_update_params.py +0 -0
  120. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/__init__.py +0 -0
  121. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/limit_tags.py +0 -0
  122. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_create_params.py +0 -0
  123. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_create_response.py +0 -0
  124. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_delete_response.py +0 -0
  125. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_list_response.py +0 -0
  126. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_remove_params.py +0 -0
  127. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_remove_response.py +0 -0
  128. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_update_params.py +0 -0
  129. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/limits/tag_update_response.py +0 -0
  130. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  131. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/requests/__init__.py +0 -0
  132. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/requests/property_create_params.py +0 -0
  133. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/requests/request_result.py +0 -0
  134. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/requests_data.py +0 -0
  135. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/__init__.py +0 -0
  136. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/evaluation_response.py +0 -0
  137. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/ingest_units.py +0 -0
  138. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  139. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  140. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/properties_response.py +0 -0
  141. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/xproxy_error.py +0 -0
  142. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared/xproxy_result.py +0 -0
  143. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared_params/__init__.py +0 -0
  144. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared_params/ingest_units.py +0 -0
  145. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  146. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/total_cost_data.py +0 -0
  147. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_case_instance_response.py +0 -0
  148. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/__init__.py +0 -0
  149. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definition_create_params.py +0 -0
  150. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definition_list_params.py +0 -0
  151. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definition_update_params.py +0 -0
  152. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  153. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  154. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  155. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  156. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  157. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  158. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  159. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  160. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  161. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  162. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/kpi_create_params.py +0 -0
  163. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  164. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  165. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  166. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/property_create_params.py +0 -0
  167. {payi-0.1.0a90 → payi-0.1.0a92}/src/payi/types/use_cases/use_case_definition.py +0 -0
  168. {payi-0.1.0a90 → payi-0.1.0a92}/tests/__init__.py +0 -0
  169. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/__init__.py +0 -0
  170. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/categories/__init__.py +0 -0
  171. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
  172. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/categories/test_resources.py +0 -0
  173. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/experiences/__init__.py +0 -0
  174. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/experiences/test_properties.py +0 -0
  175. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/experiences/test_types.py +0 -0
  176. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/experiences/types/__init__.py +0 -0
  177. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/experiences/types/test_limit_config.py +0 -0
  178. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/limits/__init__.py +0 -0
  179. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/limits/test_tags.py +0 -0
  180. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/requests/__init__.py +0 -0
  181. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/requests/test_properties.py +0 -0
  182. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/requests/test_result.py +0 -0
  183. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/test_categories.py +0 -0
  184. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/test_experiences.py +0 -0
  185. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/test_ingest.py +0 -0
  186. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/test_limits.py +0 -0
  187. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/test_use_cases.py +0 -0
  188. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/__init__.py +0 -0
  189. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  190. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  191. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  192. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  193. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/test_definitions.py +0 -0
  194. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/test_kpis.py +0 -0
  195. {payi-0.1.0a90 → payi-0.1.0a92}/tests/api_resources/use_cases/test_properties.py +0 -0
  196. {payi-0.1.0a90 → payi-0.1.0a92}/tests/conftest.py +0 -0
  197. {payi-0.1.0a90 → payi-0.1.0a92}/tests/sample_file.txt +0 -0
  198. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_deepcopy.py +0 -0
  199. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_extract_files.py +0 -0
  200. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_files.py +0 -0
  201. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_models.py +0 -0
  202. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_qs.py +0 -0
  203. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_required_args.py +0 -0
  204. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_response.py +0 -0
  205. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_streaming.py +0 -0
  206. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_transform.py +0 -0
  207. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_utils/test_proxy.py +0 -0
  208. {payi-0.1.0a90 → payi-0.1.0a92}/tests/test_utils/test_typing.py +0 -0
  209. {payi-0.1.0a90 → payi-0.1.0a92}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.92"
3
+ }
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.92 (2025-06-30)
4
+
5
+ Full Changelog: [v0.1.0-alpha.91...v0.1.0-alpha.92](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.91...v0.1.0-alpha.92)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **ci:** correct conditional ([b1b1775](https://github.com/Pay-i/pay-i-python/commit/b1b17750b13111f2eb5a7d76fa84134f07575e3b))
10
+ * **ci:** release-doctor — report correct token name ([48fc8a1](https://github.com/Pay-i/pay-i-python/commit/48fc8a1381674b1506518c149c483a518d693ffd))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **ci:** only run for pushes and fork pull requests ([ba502ab](https://github.com/Pay-i/pay-i-python/commit/ba502aba39af4a8aca8b64c90b1cb8d323926f93))
16
+
17
+ ## 0.1.0-alpha.91 (2025-06-25)
18
+
19
+ Full Changelog: [v0.1.0-alpha.90...v0.1.0-alpha.91](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.90...v0.1.0-alpha.91)
20
+
21
+ ### Features
22
+
23
+ * do not instrument inline base64 image data by default ([#331](https://github.com/Pay-i/pay-i-python/issues/331)) ([8b0455d](https://github.com/Pay-i/pay-i-python/commit/8b0455d24cda3060bc2170b05e5438c72885bf1a))
24
+
25
+
26
+ ### Chores
27
+
28
+ * **tests:** skip some failing tests on the latest python versions ([1856b99](https://github.com/Pay-i/pay-i-python/commit/1856b99b5802dc02e4f536818f1a205d9da708c2))
29
+
3
30
  ## 0.1.0-alpha.90 (2025-06-23)
4
31
 
5
32
  Full Changelog: [v0.1.0-alpha.89...v0.1.0-alpha.90](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.89...v0.1.0-alpha.90)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a90
3
+ Version: 0.1.0a92
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
@@ -3,7 +3,7 @@
3
3
  errors=()
4
4
 
5
5
  if [ -z "${PYPI_TOKEN}" ]; then
6
- errors+=("The PAYI_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
6
+ errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
7
7
  fi
8
8
 
9
9
  lenErrors=${#errors[@]}
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.90"
3
+ version = "0.1.0-alpha.92"
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.90" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.92" # x-release-please-version
@@ -173,10 +173,15 @@ class _AnthropicProviderRequest(_ProviderRequest):
173
173
 
174
174
  messages = kwargs.get("messages")
175
175
  if messages:
176
+
176
177
  anthropic_has_image_and_get_texts(self, messages)
177
178
 
178
179
  return True
179
180
 
181
+ @override
182
+ def remove_inline_data(self, prompt: 'dict[str, Any]') -> bool:
183
+ return anthropic_remove_inline_data(prompt)
184
+
180
185
  @override
181
186
  def process_exception(self, exception: Exception, kwargs: Any, ) -> bool:
182
187
  try:
@@ -352,4 +357,30 @@ def has_image_and_get_texts(encoding: tiktoken.Encoding, content: Union[str, 'li
352
357
  token_count = sum(len(encoding.encode(item.get("text", ""))) for item in content if item.get("type") == "text")
353
358
  return has_image, token_count
354
359
 
355
- return False, 0
360
+ return False, 0
361
+
362
+ def anthropic_remove_inline_data(prompt: 'dict[str, Any]') -> bool:# noqa: ARG002
363
+ messages = prompt.get("messages", [])
364
+ if not messages:
365
+ return False
366
+
367
+ modified = False
368
+ for message in messages:
369
+ content = message.get('content', Any)
370
+ if not content or not isinstance(content, list):
371
+ continue
372
+
373
+ for item in content: # type: ignore
374
+ if not isinstance(item, dict):
375
+ continue
376
+ # item: dict[str, Any]
377
+ type = item.get("type", "") # type: ignore
378
+ if type != "image":
379
+ continue
380
+
381
+ source = item.get("source", {}) # type: ignore
382
+ if source.get("type", "") == "base64": # type: ignore
383
+ source["data"] = _PayiInstrumentor._not_instrumented
384
+ modified = True
385
+
386
+ return modified
@@ -356,6 +356,24 @@ class _BedrockInvokeProviderRequest(_BedrockProviderRequest):
356
356
 
357
357
  return response
358
358
 
359
+ @override
360
+ def remove_inline_data(self, prompt: 'dict[str, Any]') -> bool:# noqa: ARG002
361
+ if not self._is_anthropic:
362
+ return False
363
+
364
+ from .AnthropicInstrumentor import anthropic_remove_inline_data
365
+ body = prompt.get("body", "")
366
+ if not body:
367
+ return False
368
+
369
+ body_json = json.loads(body)
370
+
371
+ if anthropic_remove_inline_data(body_json):
372
+ prompt["body"] = json.dumps(body_json)
373
+ return True
374
+
375
+ return False
376
+
359
377
  class _BedrockConverseProviderRequest(_BedrockProviderRequest):
360
378
  @override
361
379
  def process_synchronous_response(
@@ -301,9 +301,9 @@ class _OpenAiProviderRequest(_ProviderRequest):
301
301
  units["text"] = Units(input=input, output=output)
302
302
 
303
303
  @staticmethod
304
- def has_image_and_get_texts(encoding: tiktoken.Encoding, content: Union[str, 'list[Any]'], image_type: str = "image_url", text_type:str = "text") -> 'tuple[bool, int]':
304
+ def has_image_and_get_texts(encoding: tiktoken.Encoding, content: Union[str, 'list[Any]'], image_type: str, text_type: str) -> 'tuple[bool, int]':
305
305
  if isinstance(content, list): # type: ignore
306
- has_image = any(item.get("type") == image_type for item in content)
306
+ has_image = any(item.get("type", "") == image_type for item in content)
307
307
  if has_image is False:
308
308
  return has_image, 0
309
309
 
@@ -311,6 +311,28 @@ class _OpenAiProviderRequest(_ProviderRequest):
311
311
  return has_image, token_count
312
312
  return False, 0
313
313
 
314
+ @staticmethod
315
+ def post_process_request_prompt(content: Union[str, 'list[Any]'], image_type: str, url_subkey: bool) -> bool:
316
+ modified = False
317
+ if isinstance(content, list): # type: ignore
318
+ for item in content:
319
+ type = item.get("type", "")
320
+ if type != image_type:
321
+ continue
322
+
323
+ if url_subkey:
324
+ url = item.get("image_url", {}).get("url", "")
325
+ if url.startswith("data:"):
326
+ item["image_url"]["url"] = _PayiInstrumentor._not_instrumented
327
+ modified = True
328
+ else:
329
+ url = item.get("image_url", "")
330
+ if url.startswith("data:"):
331
+ item["image_url"] = _PayiInstrumentor._not_instrumented
332
+ modified = True
333
+
334
+ return modified
335
+
314
336
  class _OpenAiEmbeddingsProviderRequest(_OpenAiProviderRequest):
315
337
  def __init__(self, instrumentor: _PayiInstrumentor):
316
338
  super().__init__(
@@ -397,7 +419,7 @@ class _OpenAiChatProviderRequest(_OpenAiProviderRequest):
397
419
 
398
420
  if enc:
399
421
  for message in messages:
400
- msg_has_image, msg_prompt_tokens = self.has_image_and_get_texts(enc, message.get('content', ''))
422
+ msg_has_image, msg_prompt_tokens = self.has_image_and_get_texts(enc, message.get('content', ''), image_type="image_url", text_type="text")
401
423
  if msg_has_image:
402
424
  has_image = True
403
425
  estimated_token_count += msg_prompt_tokens
@@ -418,6 +440,13 @@ class _OpenAiChatProviderRequest(_OpenAiProviderRequest):
418
440
  self._include_usage_added = True
419
441
  return True
420
442
 
443
+ @override
444
+ def remove_inline_data(self, prompt: 'dict[str, Any]') -> bool:
445
+ messages = prompt.get("messages", None)
446
+ if not messages:
447
+ return False
448
+ return self.post_process_request_prompt(messages, image_type="image_url", url_subkey=True)
449
+
421
450
  @override
422
451
  def process_synchronous_response(
423
452
  self,
@@ -531,6 +560,21 @@ class _OpenAiResponsesProviderRequest(_OpenAiProviderRequest):
531
560
 
532
561
  return True
533
562
 
563
+ @override
564
+ def remove_inline_data(self, prompt: 'dict[str, Any]') -> bool:
565
+ modified = False
566
+ input = prompt.get("input", [])
567
+ for item in input:
568
+ if not isinstance(item, dict):
569
+ continue
570
+
571
+ for key, value in item.items(): # type: ignore
572
+ if key == "content":
573
+ if isinstance(value, list):
574
+ modified = self.post_process_request_prompt(value, image_type="input_image", url_subkey=False) | modified # type: ignore
575
+
576
+ return modified
577
+
534
578
  @override
535
579
  def process_synchronous_response(
536
580
  self,
@@ -1,6 +1,7 @@
1
1
  import json
2
2
  import math
3
3
  from typing import Any, Optional
4
+ from typing_extensions import override
4
5
 
5
6
  from payi.lib.helpers import PayiCategories
6
7
  from payi.types.ingest_units_params import Units
@@ -62,7 +63,22 @@ class _VertexRequest(_ProviderRequest): # type: ignore
62
63
  ingest = True
63
64
 
64
65
  return _ChunkResult(send_chunk_to_caller=True, ingest=ingest)
65
-
66
+
67
+ @override
68
+ def remove_inline_data(self, prompt: 'dict[str, Any]') -> bool:
69
+ modified = False
70
+
71
+ parts: list[dict[str, Any]] = prompt["contents"].get("parts", [])
72
+ for part in parts:
73
+ inline_data = part.get("inline_data", {})
74
+ if not isinstance(inline_data, dict):
75
+ continue
76
+ if "data" in inline_data:
77
+ inline_data["data"] = _PayiInstrumentor._not_instrumented
78
+ modified = True
79
+
80
+ return modified
81
+
66
82
  def process_response_part_for_function_call(self, part: 'dict[str, Any]') -> None:
67
83
  function = part.get("function_call", {})
68
84
  if not function:
@@ -67,6 +67,9 @@ class _ProviderRequest:
67
67
  def process_initial_stream_response(self, response: Any) -> None:
68
68
  pass
69
69
 
70
+ def remove_inline_data(self, prompt: 'dict[str, Any]') -> bool:# noqa: ARG002
71
+ return False
72
+
70
73
  @property
71
74
  def is_aws_client(self) -> bool:
72
75
  return self._is_aws_client if self._is_aws_client is not None else False
@@ -133,6 +136,7 @@ class _ProviderRequest:
133
136
  class PayiInstrumentConfig(TypedDict, total=False):
134
137
  proxy: bool
135
138
  global_instrumentation: bool
139
+ instrument_inline_data: bool
136
140
  limit_ids: Optional["list[str]"]
137
141
  use_case_name: Optional[str]
138
142
  use_case_id: Optional[str]
@@ -183,6 +187,8 @@ class _TrackContext:
183
187
  _instrumentor.__exit__(exc_type, exc_val, exc_tb)
184
188
 
185
189
  class _PayiInstrumentor:
190
+ _not_instrumented: str = "<not_instrumented>"
191
+
186
192
  def __init__(
187
193
  self,
188
194
  payi: Optional[Payi],
@@ -219,6 +225,8 @@ class _PayiInstrumentor:
219
225
  # default is instrument and ingest metrics
220
226
  self._proxy_default: bool = global_config.get("proxy", False)
221
227
 
228
+ self._instrument_inline_data: bool = global_config.get("instrument_inline_data", False)
229
+
222
230
  global_instrumentation = global_config.pop("global_instrumentation", True)
223
231
 
224
232
  if instruments is None or "*" in instruments:
@@ -345,6 +353,18 @@ class _PayiInstrumentor:
345
353
  # convert the function call builder to a list of function calls
346
354
  ingest_units["provider_response_function_calls"] = list(request._function_call_builder.values())
347
355
 
356
+ request_json = ingest_units.get('provider_request_json', "")
357
+ if request_json and self._instrument_inline_data is False:
358
+ try:
359
+ prompt_dict = json.loads(request_json)
360
+ if request.remove_inline_data(prompt_dict):
361
+ self._logger.debug(f"Removed inline data from provider_request_json")
362
+ # store the modified dict back as JSON string
363
+ ingest_units['provider_request_json'] = json.dumps(prompt_dict)
364
+
365
+ except Exception as e:
366
+ self._logger.error(f"Error serializing provider_request_json: {e}")
367
+
348
368
  if int(ingest_units.get("http_status_code") or 0) < 400:
349
369
  units = ingest_units.get("units", {})
350
370
  if not units or all(unit.get("input", 0) == 0 and unit.get("output", 0) == 0 for unit in units.values()):
@@ -191,6 +191,7 @@ class TestPayi:
191
191
  copy_param = copy_signature.parameters.get(name)
192
192
  assert copy_param is not None, f"copy() signature is missing the {name} param"
193
193
 
194
+ @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12")
194
195
  def test_copy_build_request(self) -> None:
195
196
  options = FinalRequestOptions(method="get", url="/foo")
196
197
 
@@ -985,6 +986,7 @@ class TestAsyncPayi:
985
986
  copy_param = copy_signature.parameters.get(name)
986
987
  assert copy_param is not None, f"copy() signature is missing the {name} param"
987
988
 
989
+ @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12")
988
990
  def test_copy_build_request(self) -> None:
989
991
  options = FinalRequestOptions(method="get", url="/foo")
990
992
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.90"
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