payi 0.1.0a125__tar.gz → 0.1.0a127__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 (207) hide show
  1. payi-0.1.0a127/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a125 → payi-0.1.0a127}/CHANGELOG.md +16 -0
  3. {payi-0.1.0a125 → payi-0.1.0a127}/PKG-INFO +1 -1
  4. {payi-0.1.0a125 → payi-0.1.0a127}/api.md +2 -6
  5. {payi-0.1.0a125 → payi-0.1.0a127}/pyproject.toml +1 -1
  6. {payi-0.1.0a125 → payi-0.1.0a127}/requirements-dev.lock +5 -5
  7. {payi-0.1.0a125 → payi-0.1.0a127}/requirements.lock +5 -5
  8. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_version.py +1 -1
  9. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/BedrockInstrumentor.py +35 -25
  10. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/helpers.py +12 -0
  11. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/instrument.py +136 -143
  12. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/categories/__init__.py +0 -14
  13. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/categories/categories.py +0 -32
  14. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/categories/resources.py +4 -0
  15. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/ingest.py +20 -8
  16. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/request_id/properties.py +3 -3
  17. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/response_id/properties.py +3 -3
  18. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/properties.py +3 -3
  19. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/__init__.py +2 -0
  20. payi-0.1.0a127/src/payi/types/bulk_ingest_response.py +29 -0
  21. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/categories/__init__.py +0 -1
  22. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/categories/resource_list_params.py +5 -1
  23. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/category_resource_response.py +31 -1
  24. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/ingest_event_param.py +2 -2
  25. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/ingest_units_params.py +2 -2
  26. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/requests/request_id/property_update_params.py +2 -2
  27. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/requests/response_id/property_update_params.py +2 -2
  28. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/__init__.py +2 -0
  29. payi-0.1.0a127/src/payi/types/shared/api_error.py +18 -0
  30. payi-0.1.0a127/src/payi/types/shared/properties_request.py +11 -0
  31. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/xproxy_result.py +2 -0
  32. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/property_update_params.py +2 -2
  33. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/categories/test_resources.py +2 -0
  34. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/test_limits.py +8 -8
  35. payi-0.1.0a125/.release-please-manifest.json +0 -3
  36. payi-0.1.0a125/src/payi/resources/categories/fixed_cost_resources.py +0 -196
  37. payi-0.1.0a125/src/payi/types/bulk_ingest_response.py +0 -46
  38. payi-0.1.0a125/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -22
  39. payi-0.1.0a125/tests/api_resources/categories/test_fixed_cost_resources.py +0 -153
  40. {payi-0.1.0a125 → payi-0.1.0a127}/.gitignore +0 -0
  41. {payi-0.1.0a125 → payi-0.1.0a127}/CONTRIBUTING.md +0 -0
  42. {payi-0.1.0a125 → payi-0.1.0a127}/LICENSE +0 -0
  43. {payi-0.1.0a125 → payi-0.1.0a127}/README.md +0 -0
  44. {payi-0.1.0a125 → payi-0.1.0a127}/SECURITY.md +0 -0
  45. {payi-0.1.0a125 → payi-0.1.0a127}/bin/check-release-environment +0 -0
  46. {payi-0.1.0a125 → payi-0.1.0a127}/bin/publish-pypi +0 -0
  47. {payi-0.1.0a125 → payi-0.1.0a127}/examples/.keep +0 -0
  48. {payi-0.1.0a125 → payi-0.1.0a127}/noxfile.py +0 -0
  49. {payi-0.1.0a125 → payi-0.1.0a127}/release-please-config.json +0 -0
  50. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/__init__.py +0 -0
  51. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_base_client.py +0 -0
  52. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_client.py +0 -0
  53. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_compat.py +0 -0
  54. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_constants.py +0 -0
  55. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_exceptions.py +0 -0
  56. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_files.py +0 -0
  57. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_models.py +0 -0
  58. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_qs.py +0 -0
  59. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_resource.py +0 -0
  60. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_response.py +0 -0
  61. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_streaming.py +0 -0
  62. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_types.py +0 -0
  63. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/__init__.py +0 -0
  64. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_compat.py +0 -0
  65. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_datetime_parse.py +0 -0
  66. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_logs.py +0 -0
  67. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_proxy.py +0 -0
  68. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_reflection.py +0 -0
  69. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_resources_proxy.py +0 -0
  70. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_streams.py +0 -0
  71. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_sync.py +0 -0
  72. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_transform.py +0 -0
  73. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_typing.py +0 -0
  74. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/_utils/_utils.py +0 -0
  75. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/.keep +0 -0
  76. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/AnthropicInstrumentor.py +0 -0
  77. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/GoogleGenAiInstrumentor.py +0 -0
  78. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/OpenAIInstrumentor.py +0 -0
  79. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/Stopwatch.py +0 -0
  80. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/VertexInstrumentor.py +0 -0
  81. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/VertexRequest.py +0 -0
  82. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/data/cohere_embed_english_v3.json +0 -0
  83. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/lib/version_helper.py +0 -0
  84. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/pagination.py +0 -0
  85. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/py.typed +0 -0
  86. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/__init__.py +0 -0
  87. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/limits/__init__.py +0 -0
  88. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/limits/limits.py +0 -0
  89. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/limits/tags.py +0 -0
  90. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/__init__.py +0 -0
  91. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/request_id/__init__.py +0 -0
  92. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/request_id/request_id.py +0 -0
  93. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/request_id/result.py +0 -0
  94. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/requests.py +0 -0
  95. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/response_id/__init__.py +0 -0
  96. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/response_id/response_id.py +0 -0
  97. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/requests/response_id/result.py +0 -0
  98. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/__init__.py +0 -0
  99. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  100. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  101. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  102. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  103. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/definitions/version.py +0 -0
  104. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/kpis.py +0 -0
  105. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/resources/use_cases/use_cases.py +0 -0
  106. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/categories/resource_create_params.py +0 -0
  107. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/category_delete_resource_response.py +0 -0
  108. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/category_delete_response.py +0 -0
  109. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/category_list_params.py +0 -0
  110. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/category_list_resources_params.py +0 -0
  111. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/category_response.py +0 -0
  112. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/cost_data.py +0 -0
  113. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/cost_details.py +0 -0
  114. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/default_response.py +0 -0
  115. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/ingest_bulk_params.py +0 -0
  116. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/ingest_response.py +0 -0
  117. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limit_create_params.py +0 -0
  118. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limit_history_response.py +0 -0
  119. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limit_list_params.py +0 -0
  120. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limit_list_response.py +0 -0
  121. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limit_reset_params.py +0 -0
  122. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limit_response.py +0 -0
  123. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limit_update_params.py +0 -0
  124. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/__init__.py +0 -0
  125. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/limit_tags.py +0 -0
  126. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_create_params.py +0 -0
  127. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_create_response.py +0 -0
  128. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_delete_response.py +0 -0
  129. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_list_response.py +0 -0
  130. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_remove_params.py +0 -0
  131. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_remove_response.py +0 -0
  132. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_update_params.py +0 -0
  133. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/limits/tag_update_response.py +0 -0
  134. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  135. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/request_result.py +0 -0
  136. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/requests/__init__.py +0 -0
  137. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/requests/request_id/__init__.py +0 -0
  138. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/requests/response_id/__init__.py +0 -0
  139. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/requests_data.py +0 -0
  140. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/evaluation_response.py +0 -0
  141. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/ingest_units.py +0 -0
  142. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  143. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  144. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/properties_response.py +0 -0
  145. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared/xproxy_error.py +0 -0
  146. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared_params/__init__.py +0 -0
  147. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared_params/ingest_units.py +0 -0
  148. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  149. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/total_cost_data.py +0 -0
  150. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_case_instance_response.py +0 -0
  151. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/__init__.py +0 -0
  152. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definition_create_params.py +0 -0
  153. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definition_list_params.py +0 -0
  154. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definition_update_params.py +0 -0
  155. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  156. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  157. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  158. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  159. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  160. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  161. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  162. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  163. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  164. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  165. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  166. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  167. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  168. {payi-0.1.0a125 → payi-0.1.0a127}/src/payi/types/use_cases/use_case_definition.py +0 -0
  169. {payi-0.1.0a125 → payi-0.1.0a127}/tests/__init__.py +0 -0
  170. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/__init__.py +0 -0
  171. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/categories/__init__.py +0 -0
  172. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/limits/__init__.py +0 -0
  173. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/limits/test_tags.py +0 -0
  174. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/requests/__init__.py +0 -0
  175. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/requests/request_id/__init__.py +0 -0
  176. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/requests/request_id/test_properties.py +0 -0
  177. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/requests/request_id/test_result.py +0 -0
  178. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/requests/response_id/__init__.py +0 -0
  179. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/requests/response_id/test_properties.py +0 -0
  180. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/requests/response_id/test_result.py +0 -0
  181. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/test_categories.py +0 -0
  182. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/test_ingest.py +0 -0
  183. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/test_use_cases.py +0 -0
  184. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/__init__.py +0 -0
  185. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  186. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  187. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  188. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  189. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/test_definitions.py +0 -0
  190. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/test_kpis.py +0 -0
  191. {payi-0.1.0a125 → payi-0.1.0a127}/tests/api_resources/use_cases/test_properties.py +0 -0
  192. {payi-0.1.0a125 → payi-0.1.0a127}/tests/conftest.py +0 -0
  193. {payi-0.1.0a125 → payi-0.1.0a127}/tests/sample_file.txt +0 -0
  194. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_client.py +0 -0
  195. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_deepcopy.py +0 -0
  196. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_extract_files.py +0 -0
  197. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_files.py +0 -0
  198. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_models.py +0 -0
  199. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_qs.py +0 -0
  200. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_required_args.py +0 -0
  201. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_response.py +0 -0
  202. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_streaming.py +0 -0
  203. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_transform.py +0 -0
  204. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_utils/test_datetime_parse.py +0 -0
  205. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_utils/test_proxy.py +0 -0
  206. {payi-0.1.0a125 → payi-0.1.0a127}/tests/test_utils/test_typing.py +0 -0
  207. {payi-0.1.0a125 → payi-0.1.0a127}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.127"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.127 (2025-10-09)
4
+
5
+ Full Changelog: [v0.1.0-alpha.126...v0.1.0-alpha.127](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.126...v0.1.0-alpha.127)
6
+
7
+ ### Features
8
+
9
+ * manual updates ([8becaf6](https://github.com/Pay-i/pay-i-python/commit/8becaf66c1ab732de4224fc7f0ca01270cbbe9e9))
10
+
11
+ ## 0.1.0-alpha.126 (2025-10-07)
12
+
13
+ Full Changelog: [v0.1.0-alpha.125...v0.1.0-alpha.126](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.125...v0.1.0-alpha.126)
14
+
15
+ ### Features
16
+
17
+ * offline instrumentation ([#378](https://github.com/Pay-i/pay-i-python/issues/378)) ([ae6a60f](https://github.com/Pay-i/pay-i-python/commit/ae6a60f5992f10bccbdaaf56a0097b2661e70643))
18
+
3
19
  ## 0.1.0-alpha.125 (2025-09-30)
4
20
 
5
21
  Full Changelog: [v0.1.0-alpha.124...v0.1.0-alpha.125](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.124...v0.1.0-alpha.125)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a125
3
+ Version: 0.1.0a127
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
@@ -2,9 +2,11 @@
2
2
 
3
3
  ```python
4
4
  from payi.types import (
5
+ APIError,
5
6
  IngestUnits,
6
7
  PayICommonModelsBudgetManagementCostDetailsBase,
7
8
  PayICommonModelsBudgetManagementCreateLimitBase,
9
+ PropertiesRequest,
8
10
  PropertiesResponse,
9
11
  XproxyError,
10
12
  XproxyResult,
@@ -108,12 +110,6 @@ Methods:
108
110
  - <code title="get /api/v1/categories/{category}/resources/{resource}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">list</a>(resource, \*, category, \*\*<a href="src/payi/types/categories/resource_list_params.py">params</a>) -> <a href="./src/payi/types/category_resource_response.py">SyncCursorPage[CategoryResourceResponse]</a></code>
109
111
  - <code title="delete /api/v1/categories/{category}/resources/{resource}/{resource_id}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">delete</a>(resource_id, \*, category, resource) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
110
112
 
111
- ## FixedCostResources
112
-
113
- Methods:
114
-
115
- - <code title="post /api/v1/categories/{category}/fixed_cost_resources/{resource}">client.categories.fixed_cost_resources.<a href="./src/payi/resources/categories/fixed_cost_resources.py">create</a>(resource, \*, category, \*\*<a href="src/payi/types/categories/fixed_cost_resource_create_params.py">params</a>) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
116
-
117
113
  # UseCases
118
114
 
119
115
  Types:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.125"
3
+ version = "0.1.0-alpha.127"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -52,11 +52,11 @@ filelock==3.12.4
52
52
  frozenlist==1.6.2
53
53
  # via aiohttp
54
54
  # via aiosignal
55
- fsspec==2025.7.0
55
+ fsspec==2025.9.0
56
56
  # via huggingface-hub
57
57
  h11==0.16.0
58
58
  # via httpcore
59
- hf-xet==1.1.7
59
+ hf-xet==1.1.10
60
60
  # via huggingface-hub
61
61
  httpcore==1.0.9
62
62
  # via httpx
@@ -66,7 +66,7 @@ httpx==0.28.1
66
66
  # via respx
67
67
  httpx-aiohttp==0.1.8
68
68
  # via payi
69
- huggingface-hub==0.34.4
69
+ huggingface-hub==0.35.3
70
70
  # via tokenizers
71
71
  idna==3.4
72
72
  # via anyio
@@ -118,7 +118,7 @@ python-dateutil==2.8.2
118
118
  # via time-machine
119
119
  pytz==2023.3.post1
120
120
  # via dirty-equals
121
- pyyaml==6.0.2
121
+ pyyaml==6.0.3
122
122
  # via huggingface-hub
123
123
  regex==2024.11.6
124
124
  # via tiktoken
@@ -138,7 +138,7 @@ sniffio==1.3.0
138
138
  tiktoken==0.8.0
139
139
  # via payi
140
140
  time-machine==2.9.0
141
- tokenizers==0.21.4
141
+ tokenizers==0.22.1
142
142
  # via payi
143
143
  tomli==2.0.2
144
144
  # via mypy
@@ -41,11 +41,11 @@ filelock==3.19.1
41
41
  frozenlist==1.6.2
42
42
  # via aiohttp
43
43
  # via aiosignal
44
- fsspec==2025.7.0
44
+ fsspec==2025.9.0
45
45
  # via huggingface-hub
46
46
  h11==0.16.0
47
47
  # via httpcore
48
- hf-xet==1.1.7
48
+ hf-xet==1.1.10
49
49
  # via huggingface-hub
50
50
  httpcore==1.0.9
51
51
  # via httpx
@@ -54,7 +54,7 @@ httpx==0.28.1
54
54
  # via payi
55
55
  httpx-aiohttp==0.1.8
56
56
  # via payi
57
- huggingface-hub==0.34.4
57
+ huggingface-hub==0.35.3
58
58
  # via tokenizers
59
59
  idna==3.4
60
60
  # via anyio
@@ -75,7 +75,7 @@ pydantic==2.11.9
75
75
  # via payi
76
76
  pydantic-core==2.33.2
77
77
  # via pydantic
78
- pyyaml==6.0.2
78
+ pyyaml==6.0.3
79
79
  # via huggingface-hub
80
80
  regex==2024.11.6
81
81
  # via tiktoken
@@ -87,7 +87,7 @@ sniffio==1.3.0
87
87
  # via payi
88
88
  tiktoken==0.8.0
89
89
  # via payi
90
- tokenizers==0.21.4
90
+ tokenizers==0.22.1
91
91
  # via payi
92
92
  tqdm==4.67.1
93
93
  # via huggingface-hub
@@ -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.125" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.127" # x-release-please-version
@@ -1,13 +1,12 @@
1
1
  import os
2
2
  import json
3
- from typing import Any, Optional, Sequence
3
+ from typing import TYPE_CHECKING, Any, Optional, Sequence
4
4
  from functools import wraps
5
5
  from typing_extensions import override
6
6
 
7
7
  from wrapt import ObjectProxy, wrap_function_wrapper # type: ignore
8
- from tokenizers import Tokenizer # type: ignore
9
8
 
10
- from payi.lib.helpers import PayiCategories, PayiHeaderNames, payi_aws_bedrock_url
9
+ from payi.lib.helpers import PayiCategories, PayiHeaderNames, PayiPropertyNames, payi_aws_bedrock_url
11
10
  from payi.types.ingest_units_params import Units
12
11
  from payi.types.pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
13
12
 
@@ -21,9 +20,10 @@ from .instrument import (
21
20
  )
22
21
  from .version_helper import get_version_helper
23
22
 
24
- GUARDRAIL_ID = "system.aws.bedrock.guardrail.id"
25
- GUARDRAIL_VERSION = "system.aws.bedrock.guardrail.version"
26
- GUARDRAIL_ACTION = "system.aws.bedrock.guardrail.action"
23
+ if TYPE_CHECKING:
24
+ from tokenizers import Tokenizer # type: ignore
25
+ else:
26
+ Tokenizer = None
27
27
 
28
28
  GUARDRAIL_SEMANTIC_FAILURE_DESCRIPTION = "Bedrock Guardrails intervened"
29
29
 
@@ -118,9 +118,8 @@ def _redirect_to_payi(request: Any, event_name: str, **_: 'dict[str, Any]') -> N
118
118
  for key, value in extra_headers.items():
119
119
  request.headers[key] = value
120
120
 
121
-
122
121
  class InvokeResponseWrapper(ObjectProxy): # type: ignore
123
- _cohere_embed_english_v3_tokenizer: Optional[Tokenizer] = None
122
+ _cohere_embed_english_v3_tokenizer: Optional['Tokenizer'] = None
124
123
 
125
124
  def __init__(
126
125
  self,
@@ -189,15 +188,26 @@ class InvokeResponseWrapper(ObjectProxy): # type: ignore
189
188
  if texts and len(texts) > 0:
190
189
  text = " ".join(texts)
191
190
 
192
- if self._cohere_embed_english_v3_tokenizer is None:
193
- current_dir = os.path.dirname(os.path.abspath(__file__))
194
- tokenizer_path = os.path.join(current_dir, "data", "cohere_embed_english_v3.json")
195
- self._cohere_embed_english_v3_tokenizer = Tokenizer.from_file(tokenizer_path) # type: ignore
191
+ try:
192
+ from tokenizers import Tokenizer # type: ignore
193
+
194
+ if self._cohere_embed_english_v3_tokenizer is None: # type: ignore
195
+ current_dir = os.path.dirname(os.path.abspath(__file__))
196
+ tokenizer_path = os.path.join(current_dir, "data", "cohere_embed_english_v3.json")
197
+ self._cohere_embed_english_v3_tokenizer = Tokenizer.from_file(tokenizer_path) # type: ignore
198
+
199
+ if self._cohere_embed_english_v3_tokenizer is not None and isinstance(self._cohere_embed_english_v3_tokenizer, Tokenizer): # type: ignore
200
+ tokens: list = self._cohere_embed_english_v3_tokenizer.encode(text, add_special_tokens=False).tokens # type: ignore
196
201
 
197
- tokens: list = self._cohere_embed_english_v3_tokenizer.encode(text, add_special_tokens=False).tokens # type: ignore
202
+ if tokens and isinstance(tokens, list):
203
+ units["text"] = Units(input=len(tokens), output=0) # type: ignore
198
204
 
199
- if tokens and isinstance(tokens, list):
200
- units["text"] = Units(input=len(tokens), output=0) # type: ignore
205
+ except ImportError:
206
+ self._request._instrumentor._logger.warning("tokenizers module not found, caller must install the tokenizers module. Cannot record text tokens for Cohere embed english v3")
207
+ pass
208
+ except Exception as e:
209
+ self._request._instrumentor._logger.warning(f"Error processing Cohere embed english v3 response: {e}")
210
+ pass
201
211
 
202
212
  if self._log_prompt_and_response:
203
213
  ingest["provider_response_json"] = data.decode('utf-8') # type: ignore
@@ -388,11 +398,11 @@ class _BedrockInvokeProviderRequest(_BedrockProviderRequest):
388
398
 
389
399
  guardrail_id = kwargs.get("guardrailIdentifier", "")
390
400
  if guardrail_id:
391
- self.add_internal_request_property(GUARDRAIL_ID, guardrail_id)
401
+ self.add_internal_request_property(PayiPropertyNames.aws_bedrock_guardrail_id, guardrail_id)
392
402
 
393
403
  guardrail_version = kwargs.get("guardrailVersion", "")
394
404
  if guardrail_version:
395
- self.add_internal_request_property(GUARDRAIL_VERSION, guardrail_version)
405
+ self.add_internal_request_property(PayiPropertyNames.aws_bedrock_guardrail_version, guardrail_version)
396
406
 
397
407
  if guardrail_id and guardrail_version and BedrockInstrumentor._guardrail_trace:
398
408
  trace = kwargs.get("trace", None)
@@ -488,9 +498,9 @@ class _BedrockInvokeProviderRequest(_BedrockProviderRequest):
488
498
  def process_stop_action(self, action: str) -> None:
489
499
  # record both as a semantic failure and guardrail action so it is discoverable through both properties
490
500
  if action == "INTERVENED":
491
- self.add_internal_request_property('system.failure', action)
492
- self.add_internal_request_property('system.failure.description', GUARDRAIL_SEMANTIC_FAILURE_DESCRIPTION)
493
- self.add_internal_request_property(GUARDRAIL_ACTION, action)
501
+ self.add_internal_request_property(PayiPropertyNames.failure, action)
502
+ self.add_internal_request_property(PayiPropertyNames.failure_description, GUARDRAIL_SEMANTIC_FAILURE_DESCRIPTION)
503
+ self.add_internal_request_property(PayiPropertyNames.aws_bedrock_guardrail_action, action)
494
504
 
495
505
  @override
496
506
  def remove_inline_data(self, prompt: 'dict[str, Any]') -> bool:# noqa: ARG002
@@ -519,11 +529,11 @@ class _BedrockConverseProviderRequest(_BedrockProviderRequest):
519
529
  if guardrail_config:
520
530
  guardrailIdentifier = guardrail_config.get("guardrailIdentifier", "")
521
531
  if guardrailIdentifier:
522
- self.add_internal_request_property(GUARDRAIL_ID, guardrailIdentifier)
532
+ self.add_internal_request_property(PayiPropertyNames.aws_bedrock_guardrail_id, guardrailIdentifier)
523
533
 
524
534
  guardrailVersion = guardrail_config.get("guardrailVersion", "")
525
535
  if guardrailVersion:
526
- self.add_internal_request_property(GUARDRAIL_VERSION, guardrailVersion)
536
+ self.add_internal_request_property(PayiPropertyNames.aws_bedrock_guardrail_version, guardrailVersion)
527
537
 
528
538
  if guardrailIdentifier and guardrailVersion and BedrockInstrumentor._guardrail_trace:
529
539
  trace = guardrail_config.get("trace", None)
@@ -597,9 +607,9 @@ class _BedrockConverseProviderRequest(_BedrockProviderRequest):
597
607
  def process_stop_reason(self, reason: str) -> None:
598
608
  if reason == "guardrail_intervened":
599
609
  # record both as a semantic failure and guardrail action so it is discoverable through both properties
600
- self.add_internal_request_property('system.failure', reason)
601
- self.add_internal_request_property('system.failure.description', GUARDRAIL_SEMANTIC_FAILURE_DESCRIPTION)
602
- self.add_internal_request_property(GUARDRAIL_ACTION, reason)
610
+ self.add_internal_request_property(PayiPropertyNames.failure, reason)
611
+ self.add_internal_request_property(PayiPropertyNames.failure_description, GUARDRAIL_SEMANTIC_FAILURE_DESCRIPTION)
612
+ self.add_internal_request_property(PayiPropertyNames.aws_bedrock_guardrail_action, reason)
603
613
 
604
614
  def bedrock_converse_process_streaming_for_function_call(request: _ProviderRequest, chunk: 'dict[str, Any]') -> None:
605
615
  contentBlockStart = chunk.get("contentBlockStart", {})
@@ -25,6 +25,18 @@ class PayiCategories:
25
25
  aws_bedrock:str = "system.aws.bedrock"
26
26
  google_vertex:str = "system.google.vertex"
27
27
 
28
+ class PayiPropertyNames:
29
+ failure:str = "system.failure"
30
+ failure_description:str = "system.failure.description"
31
+
32
+ account_name:str = "system.account_name"
33
+ use_case_step:str = "system.use_case_step"
34
+ user_id:str = "system.user_id"
35
+
36
+ aws_bedrock_guardrail_id:str = "system.aws.bedrock.guardrail.id"
37
+ aws_bedrock_guardrail_version:str = "system.aws.bedrock.guardrail.version"
38
+ aws_bedrock_guardrail_action:str = "system.aws.bedrock.guardrail.action"
39
+
28
40
  def create_limit_header_from_ids(*, limit_ids: List[str]) -> Dict[str, str]:
29
41
  if not isinstance(limit_ids, list): # type: ignore
30
42
  raise TypeError("limit_ids must be a list")