payi 0.1.0a99__tar.gz → 0.1.0a100__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of payi might be problematic. Click here for more details.

Files changed (191) hide show
  1. payi-0.1.0a100/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a99 → payi-0.1.0a100}/CHANGELOG.md +8 -0
  3. {payi-0.1.0a99 → payi-0.1.0a100}/PKG-INFO +1 -1
  4. {payi-0.1.0a99 → payi-0.1.0a100}/pyproject.toml +1 -1
  5. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_version.py +1 -1
  6. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/instrument.py +85 -8
  7. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/ingest.py +14 -10
  8. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/ingest_units_params.py +0 -2
  9. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/test_ingest.py +0 -4
  10. payi-0.1.0a99/.release-please-manifest.json +0 -3
  11. {payi-0.1.0a99 → payi-0.1.0a100}/.gitignore +0 -0
  12. {payi-0.1.0a99 → payi-0.1.0a100}/CONTRIBUTING.md +0 -0
  13. {payi-0.1.0a99 → payi-0.1.0a100}/LICENSE +0 -0
  14. {payi-0.1.0a99 → payi-0.1.0a100}/README.md +0 -0
  15. {payi-0.1.0a99 → payi-0.1.0a100}/SECURITY.md +0 -0
  16. {payi-0.1.0a99 → payi-0.1.0a100}/api.md +0 -0
  17. {payi-0.1.0a99 → payi-0.1.0a100}/bin/check-release-environment +0 -0
  18. {payi-0.1.0a99 → payi-0.1.0a100}/bin/publish-pypi +0 -0
  19. {payi-0.1.0a99 → payi-0.1.0a100}/examples/.keep +0 -0
  20. {payi-0.1.0a99 → payi-0.1.0a100}/mypy.ini +0 -0
  21. {payi-0.1.0a99 → payi-0.1.0a100}/noxfile.py +0 -0
  22. {payi-0.1.0a99 → payi-0.1.0a100}/release-please-config.json +0 -0
  23. {payi-0.1.0a99 → payi-0.1.0a100}/requirements-dev.lock +0 -0
  24. {payi-0.1.0a99 → payi-0.1.0a100}/requirements.lock +0 -0
  25. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/__init__.py +0 -0
  26. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_base_client.py +0 -0
  27. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_client.py +0 -0
  28. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_compat.py +0 -0
  29. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_constants.py +0 -0
  30. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_exceptions.py +0 -0
  31. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_files.py +0 -0
  32. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_models.py +0 -0
  33. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_qs.py +0 -0
  34. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_resource.py +0 -0
  35. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_response.py +0 -0
  36. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_streaming.py +0 -0
  37. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_types.py +0 -0
  38. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/__init__.py +0 -0
  39. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_logs.py +0 -0
  40. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_proxy.py +0 -0
  41. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_reflection.py +0 -0
  42. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_resources_proxy.py +0 -0
  43. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_streams.py +0 -0
  44. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_sync.py +0 -0
  45. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_transform.py +0 -0
  46. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_typing.py +0 -0
  47. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/_utils/_utils.py +0 -0
  48. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/.keep +0 -0
  49. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/AnthropicInstrumentor.py +0 -0
  50. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/BedrockInstrumentor.py +0 -0
  51. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/GoogleGenAiInstrumentor.py +0 -0
  52. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/OpenAIInstrumentor.py +0 -0
  53. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/Stopwatch.py +0 -0
  54. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/VertexInstrumentor.py +0 -0
  55. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/VertexRequest.py +0 -0
  56. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/helpers.py +0 -0
  57. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/lib/version_helper.py +0 -0
  58. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/pagination.py +0 -0
  59. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/py.typed +0 -0
  60. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/__init__.py +0 -0
  61. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/categories/__init__.py +0 -0
  62. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/categories/categories.py +0 -0
  63. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
  64. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/categories/resources.py +0 -0
  65. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/limits/__init__.py +0 -0
  66. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/limits/limits.py +0 -0
  67. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/limits/tags.py +0 -0
  68. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/requests/__init__.py +0 -0
  69. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/requests/properties.py +0 -0
  70. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/requests/requests.py +0 -0
  71. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/requests/result.py +0 -0
  72. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/__init__.py +0 -0
  73. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  74. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  75. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  76. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  77. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/definitions/version.py +0 -0
  78. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/kpis.py +0 -0
  79. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/properties.py +0 -0
  80. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/resources/use_cases/use_cases.py +0 -0
  81. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/__init__.py +0 -0
  82. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/bulk_ingest_response.py +0 -0
  83. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/categories/__init__.py +0 -0
  84. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
  85. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/categories/resource_create_params.py +0 -0
  86. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/categories/resource_list_params.py +0 -0
  87. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/category_delete_resource_response.py +0 -0
  88. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/category_delete_response.py +0 -0
  89. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/category_list_params.py +0 -0
  90. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/category_list_resources_params.py +0 -0
  91. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/category_resource_response.py +0 -0
  92. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/category_response.py +0 -0
  93. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/cost_data.py +0 -0
  94. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/cost_details.py +0 -0
  95. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/default_response.py +0 -0
  96. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/ingest_bulk_params.py +0 -0
  97. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/ingest_event_param.py +0 -0
  98. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/ingest_response.py +0 -0
  99. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limit_create_params.py +0 -0
  100. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limit_history_response.py +0 -0
  101. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limit_list_params.py +0 -0
  102. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limit_list_response.py +0 -0
  103. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limit_reset_params.py +0 -0
  104. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limit_response.py +0 -0
  105. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limit_update_params.py +0 -0
  106. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/__init__.py +0 -0
  107. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/limit_tags.py +0 -0
  108. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_create_params.py +0 -0
  109. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_create_response.py +0 -0
  110. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_delete_response.py +0 -0
  111. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_list_response.py +0 -0
  112. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_remove_params.py +0 -0
  113. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_remove_response.py +0 -0
  114. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_update_params.py +0 -0
  115. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/limits/tag_update_response.py +0 -0
  116. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  117. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/requests/__init__.py +0 -0
  118. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/requests/property_create_params.py +0 -0
  119. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/requests/request_result.py +0 -0
  120. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/requests_data.py +0 -0
  121. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/__init__.py +0 -0
  122. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/evaluation_response.py +0 -0
  123. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/ingest_units.py +0 -0
  124. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  125. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  126. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/properties_response.py +0 -0
  127. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/xproxy_error.py +0 -0
  128. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared/xproxy_result.py +0 -0
  129. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared_params/__init__.py +0 -0
  130. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared_params/ingest_units.py +0 -0
  131. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  132. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/total_cost_data.py +0 -0
  133. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_case_create_response.py +0 -0
  134. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_case_delete_response.py +0 -0
  135. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_case_retrieve_response.py +0 -0
  136. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/__init__.py +0 -0
  137. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definition_create_params.py +0 -0
  138. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definition_list_params.py +0 -0
  139. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definition_update_params.py +0 -0
  140. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  141. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  142. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  143. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  144. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  145. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  146. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  147. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  148. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  149. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  150. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  151. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  152. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  153. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/property_create_params.py +0 -0
  154. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/property_create_response.py +0 -0
  155. {payi-0.1.0a99 → payi-0.1.0a100}/src/payi/types/use_cases/use_case_definition.py +0 -0
  156. {payi-0.1.0a99 → payi-0.1.0a100}/tests/__init__.py +0 -0
  157. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/__init__.py +0 -0
  158. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/categories/__init__.py +0 -0
  159. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
  160. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/categories/test_resources.py +0 -0
  161. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/limits/__init__.py +0 -0
  162. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/limits/test_tags.py +0 -0
  163. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/requests/__init__.py +0 -0
  164. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/requests/test_properties.py +0 -0
  165. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/requests/test_result.py +0 -0
  166. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/test_categories.py +0 -0
  167. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/test_limits.py +0 -0
  168. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/test_use_cases.py +0 -0
  169. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/__init__.py +0 -0
  170. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  171. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  172. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  173. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  174. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/test_definitions.py +0 -0
  175. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/test_kpis.py +0 -0
  176. {payi-0.1.0a99 → payi-0.1.0a100}/tests/api_resources/use_cases/test_properties.py +0 -0
  177. {payi-0.1.0a99 → payi-0.1.0a100}/tests/conftest.py +0 -0
  178. {payi-0.1.0a99 → payi-0.1.0a100}/tests/sample_file.txt +0 -0
  179. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_client.py +0 -0
  180. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_deepcopy.py +0 -0
  181. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_extract_files.py +0 -0
  182. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_files.py +0 -0
  183. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_models.py +0 -0
  184. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_qs.py +0 -0
  185. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_required_args.py +0 -0
  186. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_response.py +0 -0
  187. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_streaming.py +0 -0
  188. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_transform.py +0 -0
  189. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_utils/test_proxy.py +0 -0
  190. {payi-0.1.0a99 → payi-0.1.0a100}/tests/test_utils/test_typing.py +0 -0
  191. {payi-0.1.0a99 → payi-0.1.0a100}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.100"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.100 (2025-07-16)
4
+
5
+ Full Changelog: [v0.1.0-alpha.99...v0.1.0-alpha.100](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.99...v0.1.0-alpha.100)
6
+
7
+ ### Features
8
+
9
+ * use cases and request property bags ([#342](https://github.com/Pay-i/pay-i-python/issues/342)) ([985209e](https://github.com/Pay-i/pay-i-python/commit/985209e1ac179ac7338d3845bd6498aa3d08afc3))
10
+
3
11
  ## 0.1.0-alpha.99 (2025-07-15)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.98...v0.1.0-alpha.99](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.98...v0.1.0-alpha.99)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a99
3
+ Version: 0.1.0a100
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.99"
3
+ version = "0.1.0-alpha.100"
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.99" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.100" # x-release-please-version
@@ -112,11 +112,16 @@ class _ProviderRequest:
112
112
  except Exception as _ex:
113
113
  pass
114
114
 
115
- properties: 'dict[str,str]' = { "system.failure": exception_str }
115
+ existing_properties = self._ingest.get("properties", None)
116
+ if not existing_properties:
117
+ existing_properties = {}
118
+
119
+ existing_properties['system.failure'] = exception_str
116
120
  if fields:
117
121
  failure_description = ",".join(fields)
118
- properties["system.failure.description"] = failure_description[:128]
119
- self._ingest["properties"] = properties
122
+ existing_properties["system.failure.description"] = failure_description[:128]
123
+
124
+ self._ingest["properties"] = existing_properties
120
125
 
121
126
  if "http_status_code" not in self._ingest:
122
127
  # use a non existent http status code so when presented to the user, the origin is clear
@@ -150,17 +155,21 @@ class PayiInstrumentConfig(TypedDict, total=False):
150
155
  use_case_name: Optional[str]
151
156
  use_case_id: Optional[str]
152
157
  use_case_version: Optional[int]
158
+ use_case_properties: Optional["dict[str, str]"]
153
159
  user_id: Optional[str]
154
160
  request_tags: Optional["list[str]"]
161
+ request_properties: Optional["dict[str, str]"]
155
162
 
156
163
  class PayiContext(TypedDict, total=False):
157
164
  use_case_name: Optional[str]
158
165
  use_case_id: Optional[str]
159
166
  use_case_version: Optional[int]
160
167
  use_case_step: Optional[str]
168
+ use_case_properties: Optional["dict[str, str]"]
161
169
  limit_ids: Optional['list[str]']
162
170
  user_id: Optional[str]
163
171
  request_tags: Optional["list[str]"]
172
+ request_properties: Optional["dict[str, str]"]
164
173
  price_as_category: Optional[str]
165
174
  price_as_resource: Optional[str]
166
175
  resource_scope: Optional[str]
@@ -172,9 +181,11 @@ class _Context(TypedDict, total=False):
172
181
  use_case_id: Optional[str]
173
182
  use_case_version: Optional[int]
174
183
  use_case_step: Optional[str]
184
+ use_case_properties: Optional["dict[str, str]"]
175
185
  limit_ids: Optional['list[str]']
176
186
  user_id: Optional[str]
177
187
  request_tags: Optional["list[str]"]
188
+ request_properties: Optional["dict[str, str]"]
178
189
  price_as_category: Optional[str]
179
190
  price_as_resource: Optional[str]
180
191
  resource_scope: Optional[str]
@@ -645,6 +656,8 @@ class _PayiInstrumentor:
645
656
  use_case_step: Optional[str]= None,
646
657
  user_id: Optional[str]= None,
647
658
  request_tags: Optional["list[str]"] = None,
659
+ request_properties: Optional["dict[str, str]"] = None,
660
+ use_case_properties: Optional["dict[str, str]"] = None,
648
661
  price_as_category: Optional[str] = None,
649
662
  price_as_resource: Optional[str] = None,
650
663
  resource_scope: Optional[str] = None,
@@ -719,6 +732,38 @@ class _PayiInstrumentor:
719
732
  # use the parent request_tags if it exists
720
733
  context["request_tags"] = parent_request_tags
721
734
 
735
+ parent_request_properties = parent_context.get("request_properties", None)
736
+ if request_properties is not None:
737
+ if not request_properties:
738
+ context["request_properties"] = None
739
+ else:
740
+ if parent_request_properties:
741
+ # merge dictionaries, child overrides parent keys
742
+ merged = parent_request_properties.copy()
743
+ merged.update(request_properties)
744
+ context["request_properties"] = merged
745
+ else:
746
+ context["request_properties"] = request_properties
747
+ elif parent_request_properties:
748
+ # use the parent request_properties if it exists
749
+ context["request_properties"] = parent_request_properties
750
+
751
+ parent_use_case_properties = parent_context.get("use_case_properties", None)
752
+ if use_case_properties is not None:
753
+ if not use_case_properties:
754
+ context["use_case_properties"] = None
755
+ else:
756
+ if parent_use_case_properties:
757
+ # merge dictionaries, child overrides parent keys
758
+ merged = parent_use_case_properties.copy()
759
+ merged.update(use_case_properties)
760
+ context["use_case_properties"] = merged
761
+ else:
762
+ context["use_case_properties"] = use_case_properties
763
+ elif parent_use_case_properties:
764
+ # use the parent use_case_properties if it exists
765
+ context["use_case_properties"] = parent_use_case_properties
766
+
722
767
  if use_case_step and (context["use_case_name"] or context["use_case_id"]):
723
768
  context["use_case_step"] = use_case_step
724
769
  if price_as_category:
@@ -738,6 +783,8 @@ class _PayiInstrumentor:
738
783
  use_case_version: Optional[int],
739
784
  user_id: Optional[str],
740
785
  request_tags: Optional["list[str]"] = None,
786
+ request_properties: Optional["dict[str, str]"] = None,
787
+ use_case_properties: Optional["dict[str, str]"] = None,
741
788
  *args: Any,
742
789
  **kwargs: Any,
743
790
  ) -> Any:
@@ -749,7 +796,10 @@ class _PayiInstrumentor:
749
796
  use_case_id=use_case_id,
750
797
  use_case_version=use_case_version,
751
798
  user_id=user_id,
752
- request_tags=request_tags)
799
+ request_tags=request_tags,
800
+ request_properties=request_properties,
801
+ use_case_properties=use_case_properties
802
+ )
753
803
  return await func(*args, **kwargs)
754
804
 
755
805
  def _call_func(
@@ -762,6 +812,8 @@ class _PayiInstrumentor:
762
812
  use_case_version: Optional[int],
763
813
  user_id: Optional[str],
764
814
  request_tags: Optional["list[str]"] = None,
815
+ request_properties: Optional["dict[str, str]"] = None,
816
+ use_case_properties: Optional["dict[str, str]"] = None,
765
817
  *args: Any,
766
818
  **kwargs: Any,
767
819
  ) -> Any:
@@ -773,7 +825,9 @@ class _PayiInstrumentor:
773
825
  use_case_id=use_case_id,
774
826
  use_case_version=use_case_version,
775
827
  user_id=user_id,
776
- request_tags=request_tags)
828
+ request_tags=request_tags,
829
+ request_properties=request_properties,
830
+ use_case_properties=use_case_properties)
777
831
  return func(*args, **kwargs)
778
832
 
779
833
  def __enter__(self) -> Any:
@@ -797,7 +851,8 @@ class _PayiInstrumentor:
797
851
  def _prepare_ingest(
798
852
  self,
799
853
  request: _ProviderRequest,
800
- ingest_extra_headers: "dict[str, str]", # do not coflict potential kwargs["extra_headers"]
854
+ context: _Context,
855
+ ingest_extra_headers: "dict[str, str]", # do not conflict with potential kwargs["extra_headers"]
801
856
  args: Sequence[Any],
802
857
  kwargs: 'dict[str, Any]',
803
858
  ) -> None:
@@ -827,6 +882,14 @@ class _PayiInstrumentor:
827
882
  if user_id:
828
883
  request._ingest["user_id"] = user_id
829
884
 
885
+ request_properties = context.get("request_properties", None)
886
+ if request_properties:
887
+ request._ingest["properties"] = request_properties
888
+
889
+ use_case_properties = context.get("use_case_properties", None)
890
+ if use_case_properties:
891
+ request._ingest["use_case_properties"] = use_case_properties
892
+
830
893
  if len(ingest_extra_headers) > 0:
831
894
  request._ingest["provider_request_headers"] = [PayICommonModelsAPIRouterHeaderInfoParam(name=k, value=v) for k, v in ingest_extra_headers.items()]
832
895
 
@@ -909,7 +972,7 @@ class _PayiInstrumentor:
909
972
  stream = False
910
973
 
911
974
  try:
912
- self._prepare_ingest(request, extra_headers, args, kwargs)
975
+ self._prepare_ingest(request, context, extra_headers, args, kwargs)
913
976
  self._logger.debug(f"async_invoke_wrapper: calling wrapped instance (stream={stream})")
914
977
 
915
978
  sw.start()
@@ -1032,7 +1095,7 @@ class _PayiInstrumentor:
1032
1095
  stream = False
1033
1096
 
1034
1097
  try:
1035
- self._prepare_ingest(request, extra_headers, args, kwargs)
1098
+ self._prepare_ingest(request, context, extra_headers, args, kwargs)
1036
1099
  self._logger.debug(f"invoke_wrapper: calling wrapped instance (stream={stream})")
1037
1100
 
1038
1101
  sw.start()
@@ -1586,6 +1649,7 @@ global _instrumentor
1586
1649
  _instrumentor: Optional[_PayiInstrumentor] = None
1587
1650
 
1588
1651
  def payi_instrument(
1652
+ *,
1589
1653
  payi: Optional[Union[Payi, AsyncPayi, 'list[Union[Payi, AsyncPayi]]']] = None,
1590
1654
  instruments: Optional[Set[str]] = None,
1591
1655
  log_prompt_and_response: bool = True,
@@ -1628,12 +1692,15 @@ def payi_instrument(
1628
1692
  )
1629
1693
 
1630
1694
  def track(
1695
+ *,
1631
1696
  limit_ids: Optional["list[str]"] = None,
1632
1697
  use_case_name: Optional[str] = None,
1633
1698
  use_case_id: Optional[str] = None,
1634
1699
  use_case_version: Optional[int] = None,
1635
1700
  user_id: Optional[str] = None,
1636
1701
  request_tags: Optional["list[str]"] = None,
1702
+ request_properties: Optional["dict[str, str]"] = None,
1703
+ use_case_properties: Optional["dict[str, str]"] = None,
1637
1704
  proxy: Optional[bool] = None,
1638
1705
  ) -> Any:
1639
1706
 
@@ -1656,6 +1723,8 @@ def track(
1656
1723
  use_case_version,
1657
1724
  user_id,
1658
1725
  request_tags,
1726
+ request_properties,
1727
+ use_case_properties,
1659
1728
  *args,
1660
1729
  **kwargs,
1661
1730
  )
@@ -1677,6 +1746,8 @@ def track(
1677
1746
  use_case_version,
1678
1747
  user_id,
1679
1748
  request_tags,
1749
+ request_properties,
1750
+ use_case_properties,
1680
1751
  *args,
1681
1752
  **kwargs,
1682
1753
  )
@@ -1684,6 +1755,7 @@ def track(
1684
1755
  return _track
1685
1756
 
1686
1757
  def track_context(
1758
+ *,
1687
1759
  limit_ids: Optional["list[str]"] = None,
1688
1760
  use_case_name: Optional[str] = None,
1689
1761
  use_case_id: Optional[str] = None,
@@ -1691,6 +1763,8 @@ def track_context(
1691
1763
  use_case_step: Optional[str] = None,
1692
1764
  user_id: Optional[str] = None,
1693
1765
  request_tags: Optional["list[str]"] = None,
1766
+ request_properties: Optional["dict[str, str]"] = None,
1767
+ use_case_properties: Optional["dict[str, str]"] = None,
1694
1768
  price_as_category: Optional[str] = None,
1695
1769
  price_as_resource: Optional[str] = None,
1696
1770
  resource_scope: Optional[str] = None,
@@ -1715,6 +1789,9 @@ def track_context(
1715
1789
  context["price_as_resource"] = price_as_resource
1716
1790
  context["resource_scope"] = resource_scope
1717
1791
 
1792
+ context["request_properties"] = request_properties
1793
+ context["use_case_properties"] = use_case_properties
1794
+
1718
1795
  return _InternalTrackContext(context)
1719
1796
 
1720
1797
  def get_context() -> PayiContext:
@@ -90,7 +90,6 @@ class IngestResource(SyncAPIResource):
90
90
  units: Dict[str, IngestUnits],
91
91
  end_to_end_latency_ms: Optional[int] | NotGiven = NOT_GIVEN,
92
92
  event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
93
- experience_properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
94
93
  http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
95
94
  properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
96
95
  provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
@@ -133,11 +132,13 @@ class IngestResource(SyncAPIResource):
133
132
 
134
133
  output (int): The number of output units
135
134
 
136
- event_timestamp: (str, datetime, None): The timestamp of the event. Defaults to None.
135
+ event_timestamp: (str, datetime, None): The timestamp of the event
137
136
 
138
- limit_ids (list[str], optional): The limit IDs to associate with the request. Defaults to None.
137
+ limit_ids (list[str], optional): The limit IDs to associate with the request
139
138
 
140
- request_tags (list[str], optional): The request tags to associate with the request. Defaults to None.
139
+ properties (Dict[str, str], optional): Properties to associate with the request
140
+
141
+ request_tags (list[str], optional): The request tags to associate with the request
141
142
 
142
143
  use_case_name (str, optional): The use case name
143
144
 
@@ -147,6 +148,8 @@ class IngestResource(SyncAPIResource):
147
148
 
148
149
  use_case_version (int, optional): The use case instance version
149
150
 
151
+ use_case_properties (Dict[str, str], optional): The use case properties
152
+
150
153
  user_id (str, optional): The user id
151
154
 
152
155
  resource_scope(str, optional): The scope of the resource
@@ -234,7 +237,6 @@ class IngestResource(SyncAPIResource):
234
237
  "units": units,
235
238
  "end_to_end_latency_ms": end_to_end_latency_ms,
236
239
  "event_timestamp": event_timestamp,
237
- "experience_properties": experience_properties,
238
240
  "http_status_code": http_status_code,
239
241
  "properties": properties,
240
242
  "provider_request_headers": provider_request_headers,
@@ -318,7 +320,6 @@ class AsyncIngestResource(AsyncAPIResource):
318
320
  units: Dict[str, IngestUnits],
319
321
  end_to_end_latency_ms: Optional[int] | NotGiven = NOT_GIVEN,
320
322
  event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
321
- experience_properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
322
323
  http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
323
324
  properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
324
325
  provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
@@ -360,11 +361,13 @@ class AsyncIngestResource(AsyncAPIResource):
360
361
 
361
362
  output (int): The number of output units
362
363
 
363
- event_timestamp: (datetime, None): The timestamp of the event. Defaults to None.
364
+ event_timestamp: (datetime, None): The timestamp of the event
364
365
 
365
- limit_ids (list[str], optional): The limit IDs to associate with the request. Defaults to None.
366
+ limit_ids (list[str], optional): The limit IDs to associate with the request
366
367
 
367
- request_tags (list[str], optional): The request tags to associate with the request. Defaults to None.
368
+ properties (Dict[str, str], optional): Properties to associate with the request
369
+
370
+ request_tags (list[str], optional): The request tags to associate with the request
368
371
 
369
372
  use_case_name (str, optional): The use case name
370
373
 
@@ -374,6 +377,8 @@ class AsyncIngestResource(AsyncAPIResource):
374
377
 
375
378
  use_case_version (int, optional): The use case instance version
376
379
 
380
+ use_case_properties (Dict[str, str], optional): The use case properties
381
+
377
382
  user_id (str, optional): The user id
378
383
 
379
384
  resource_scope (str, optional): The scope of the resource
@@ -460,7 +465,6 @@ class AsyncIngestResource(AsyncAPIResource):
460
465
  "units": units,
461
466
  "end_to_end_latency_ms": end_to_end_latency_ms,
462
467
  "event_timestamp": event_timestamp,
463
- "experience_properties": experience_properties,
464
468
  "http_status_code": http_status_code,
465
469
  "properties": properties,
466
470
  "provider_request_headers": provider_request_headers,
@@ -24,8 +24,6 @@ class IngestUnitsParams(TypedDict, total=False):
24
24
 
25
25
  event_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
26
26
 
27
- experience_properties: Optional[Dict[str, str]]
28
-
29
27
  http_status_code: Optional[int]
30
28
 
31
29
  properties: Optional[Dict[str, str]]
@@ -40,7 +40,6 @@ class TestIngest:
40
40
  "event_timestamp": parse_datetime("2019-12-27T18:11:19.117Z"),
41
41
  "experience_id": "experience_id",
42
42
  "experience_name": "experience_name",
43
- "experience_properties": {"foo": "string"},
44
43
  "experience_version": 0,
45
44
  "http_status_code": 0,
46
45
  "limit_ids": ["string"],
@@ -124,7 +123,6 @@ class TestIngest:
124
123
  },
125
124
  end_to_end_latency_ms=0,
126
125
  event_timestamp=parse_datetime("2019-12-27T18:11:19.117Z"),
127
- experience_properties={"foo": "string"},
128
126
  http_status_code=0,
129
127
  properties={"foo": "string"},
130
128
  provider_request_headers=[
@@ -221,7 +219,6 @@ class TestAsyncIngest:
221
219
  "event_timestamp": parse_datetime("2019-12-27T18:11:19.117Z"),
222
220
  "experience_id": "experience_id",
223
221
  "experience_name": "experience_name",
224
- "experience_properties": {"foo": "string"},
225
222
  "experience_version": 0,
226
223
  "http_status_code": 0,
227
224
  "limit_ids": ["string"],
@@ -305,7 +302,6 @@ class TestAsyncIngest:
305
302
  },
306
303
  end_to_end_latency_ms=0,
307
304
  event_timestamp=parse_datetime("2019-12-27T18:11:19.117Z"),
308
- experience_properties={"foo": "string"},
309
305
  http_status_code=0,
310
306
  properties={"foo": "string"},
311
307
  provider_request_headers=[
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.99"
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