payi 0.1.0a96__tar.gz → 0.1.0a98__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.
- payi-0.1.0a98/.release-please-manifest.json +3 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/CHANGELOG.md +24 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/PKG-INFO +4 -2
- {payi-0.1.0a96 → payi-0.1.0a98}/README.md +2 -1
- {payi-0.1.0a96 → payi-0.1.0a98}/pyproject.toml +2 -1
- {payi-0.1.0a96 → payi-0.1.0a98}/requirements-dev.lock +2 -2
- {payi-0.1.0a96 → payi-0.1.0a98}/requirements.lock +2 -2
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_models.py +8 -5
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_version.py +1 -1
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/AnthropicInstrumentor.py +7 -1
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/BedrockInstrumentor.py +8 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/GoogleGenAiInstrumentor.py +8 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/OpenAIInstrumentor.py +8 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/VertexInstrumentor.py +8 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/VertexRequest.py +40 -7
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/instrument.py +137 -41
- payi-0.1.0a98/src/payi/lib/version_helper.py +21 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_models.py +45 -0
- payi-0.1.0a96/.release-please-manifest.json +0 -3
- {payi-0.1.0a96 → payi-0.1.0a98}/.gitignore +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/LICENSE +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/SECURITY.md +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/api.md +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/bin/check-release-environment +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/bin/publish-pypi +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/examples/.keep +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/mypy.ini +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/noxfile.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/release-please-config.json +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_base_client.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_client.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_compat.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_constants.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_files.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_qs.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_resource.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_types.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_resources_proxy.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/Stopwatch.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/pagination.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/py.typed +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/categories/resources.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/ingest.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/limits/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/limits/limits.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/limits/tags.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/properties.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/requests.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/requests/result.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/definitions/version.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/kpis.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/properties.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/resources/use_cases/use_cases.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/categories/resource_list_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_list_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_list_resources_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_resource_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_event_param.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/ingest_units_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_history_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_list_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_list_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_reset_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limit_update_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/limit_tags.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_create_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_delete_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_list_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_remove_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_remove_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_update_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/limits/tag_update_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests/property_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests/request_result.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/evaluation_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/ingest_units.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/properties_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/xproxy_error.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared/xproxy_result.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared_params/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared_params/ingest_units.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_case_create_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_case_delete_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_case_retrieve_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definition_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definition_list_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definition_update_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/kpi_list_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/kpi_list_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/kpi_update_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/property_create_params.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/property_create_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/src/payi/types/use_cases/use_case_definition.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/categories/test_resources.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/limits/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/limits/test_tags.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/requests/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/requests/test_properties.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/requests/test_result.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_ingest.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_limits.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/test_use_cases.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/test_definitions.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/test_kpis.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/api_resources/use_cases/test_properties.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/conftest.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/sample_file.txt +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_client.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_files.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_qs.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_required_args.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_response.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_streaming.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_transform.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a96 → payi-0.1.0a98}/tests/utils.py +0 -0
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.98 (2025-07-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.97...v0.1.0-alpha.98](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.97...v0.1.0-alpha.98)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* instrument provider module version ([9bc9596](https://github.com/Pay-i/pay-i-python/commit/9bc9596edb103b187dc468b9592d5e8a0c5f38f3))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **parsing:** correctly handle nested discriminated unions ([38be788](https://github.com/Pay-i/pay-i-python/commit/38be7889bf028750274f66a584e229a9578033eb))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **internal:** bump pinned h11 dep ([9a1ef2e](https://github.com/Pay-i/pay-i-python/commit/9a1ef2efb18e5bd7e2e66a8176feefdc1c22ea22))
|
|
20
|
+
* **package:** mark python 3.13 as supported ([5ab6ac5](https://github.com/Pay-i/pay-i-python/commit/5ab6ac561585ffdc8ff1d07b06d873e0ef99a1ea))
|
|
21
|
+
* **readme:** fix version rendering on pypi ([3f91efc](https://github.com/Pay-i/pay-i-python/commit/3f91efc050e6ffcf97617f2b727c2f68fd83d91f))
|
|
22
|
+
|
|
23
|
+
## 0.1.0-alpha.97 (2025-07-08)
|
|
24
|
+
|
|
25
|
+
Full Changelog: [v0.1.0-alpha.96...v0.1.0-alpha.97](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.96...v0.1.0-alpha.97)
|
|
26
|
+
|
|
3
27
|
## 0.1.0-alpha.96 (2025-07-07)
|
|
4
28
|
|
|
5
29
|
Full Changelog: [v0.1.0-alpha.95...v0.1.0-alpha.96](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.95...v0.1.0-alpha.96)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: payi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a98
|
|
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
|
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
23
|
Classifier: Typing :: Typed
|
|
23
24
|
Requires-Python: >=3.8
|
|
@@ -37,7 +38,8 @@ Description-Content-Type: text/markdown
|
|
|
37
38
|
|
|
38
39
|
# Payi Python API library
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
<!-- prettier-ignore -->
|
|
42
|
+
[)](https://pypi.org/project/payi/)
|
|
41
43
|
|
|
42
44
|
The Payi Python library provides convenient access to the Payi REST API from any Python 3.8+
|
|
43
45
|
application. The library includes type definitions for all request params and response fields,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Payi Python API library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- prettier-ignore -->
|
|
4
|
+
[)](https://pypi.org/project/payi/)
|
|
4
5
|
|
|
5
6
|
The Payi Python library provides convenient access to the Payi REST API from any Python 3.8+
|
|
6
7
|
application. The library includes type definitions for all request params and response fields,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "payi"
|
|
3
|
-
version = "0.1.0-alpha.
|
|
3
|
+
version = "0.1.0-alpha.98"
|
|
4
4
|
description = "The official Python library for the payi API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -27,6 +27,7 @@ classifiers = [
|
|
|
27
27
|
"Programming Language :: Python :: 3.10",
|
|
28
28
|
"Programming Language :: Python :: 3.11",
|
|
29
29
|
"Programming Language :: Python :: 3.12",
|
|
30
|
+
"Programming Language :: Python :: 3.13",
|
|
30
31
|
"Operating System :: OS Independent",
|
|
31
32
|
"Operating System :: POSIX",
|
|
32
33
|
"Operating System :: MacOS",
|
|
@@ -2,9 +2,10 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import inspect
|
|
5
|
-
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
|
|
5
|
+
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
|
|
6
6
|
from datetime import date, datetime
|
|
7
7
|
from typing_extensions import (
|
|
8
|
+
List,
|
|
8
9
|
Unpack,
|
|
9
10
|
Literal,
|
|
10
11
|
ClassVar,
|
|
@@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
|
|
|
366
367
|
if type_ is None:
|
|
367
368
|
raise RuntimeError(f"Unexpected field type is None for {key}")
|
|
368
369
|
|
|
369
|
-
return construct_type(value=value, type_=type_)
|
|
370
|
+
return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
|
|
370
371
|
|
|
371
372
|
|
|
372
373
|
def is_basemodel(type_: type) -> bool:
|
|
@@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
|
|
|
420
421
|
return cast(_T, construct_type(value=value, type_=type_))
|
|
421
422
|
|
|
422
423
|
|
|
423
|
-
def construct_type(*, value: object, type_: object) -> object:
|
|
424
|
+
def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
|
|
424
425
|
"""Loose coercion to the expected type with construction of nested values.
|
|
425
426
|
|
|
426
427
|
If the given value does not match the expected type then it is returned as-is.
|
|
@@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
|
|
|
438
439
|
type_ = type_.__value__ # type: ignore[unreachable]
|
|
439
440
|
|
|
440
441
|
# unwrap `Annotated[T, ...]` -> `T`
|
|
441
|
-
if
|
|
442
|
-
meta: tuple[Any, ...] =
|
|
442
|
+
if metadata is not None:
|
|
443
|
+
meta: tuple[Any, ...] = tuple(metadata)
|
|
444
|
+
elif is_annotated_type(type_):
|
|
445
|
+
meta = get_args(type_)[1:]
|
|
443
446
|
type_ = extract_type_arg(type_, 0)
|
|
444
447
|
else:
|
|
445
448
|
meta = tuple()
|
|
@@ -9,9 +9,13 @@ from payi.lib.helpers import PayiCategories
|
|
|
9
9
|
from payi.types.ingest_units_params import Units
|
|
10
10
|
|
|
11
11
|
from .instrument import _ChunkResult, _IsStreaming, _StreamingType, _ProviderRequest, _PayiInstrumentor
|
|
12
|
+
from .version_helper import get_version_helper
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class AnthropicInstrumentor:
|
|
16
|
+
_module_name: str = "anthropic"
|
|
17
|
+
_module_version: str = ""
|
|
18
|
+
|
|
15
19
|
@staticmethod
|
|
16
20
|
def is_vertex(instance: Any) -> bool:
|
|
17
21
|
from anthropic import AnthropicVertex, AsyncAnthropicVertex # type: ignore # noqa: I001
|
|
@@ -27,7 +31,7 @@ class AnthropicInstrumentor:
|
|
|
27
31
|
@staticmethod
|
|
28
32
|
def instrument(instrumentor: _PayiInstrumentor) -> None:
|
|
29
33
|
try:
|
|
30
|
-
|
|
34
|
+
AnthropicInstrumentor._module_version = get_version_helper(AnthropicInstrumentor._module_name)
|
|
31
35
|
|
|
32
36
|
wrap_function_wrapper(
|
|
33
37
|
"anthropic.resources.messages",
|
|
@@ -149,6 +153,8 @@ class _AnthropicProviderRequest(_ProviderRequest):
|
|
|
149
153
|
instrumentor=instrumentor,
|
|
150
154
|
category=category,
|
|
151
155
|
streaming_type=streaming_type,
|
|
156
|
+
module_name=AnthropicInstrumentor._module_name,
|
|
157
|
+
module_version=AnthropicInstrumentor._module_version,
|
|
152
158
|
)
|
|
153
159
|
|
|
154
160
|
@override
|
|
@@ -11,15 +11,21 @@ from payi.types.ingest_units_params import Units
|
|
|
11
11
|
from payi.types.pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
|
|
12
12
|
|
|
13
13
|
from .instrument import _ChunkResult, _IsStreaming, _StreamingType, _ProviderRequest, _PayiInstrumentor
|
|
14
|
+
from .version_helper import get_version_helper
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class BedrockInstrumentor:
|
|
18
|
+
_module_name: str = "boto3"
|
|
19
|
+
_module_version: str = ""
|
|
20
|
+
|
|
17
21
|
_instrumentor: _PayiInstrumentor
|
|
18
22
|
|
|
19
23
|
@staticmethod
|
|
20
24
|
def instrument(instrumentor: _PayiInstrumentor) -> None:
|
|
21
25
|
BedrockInstrumentor._instrumentor = instrumentor
|
|
22
26
|
|
|
27
|
+
BedrockInstrumentor._module_version = get_version_helper(BedrockInstrumentor._module_name)
|
|
28
|
+
|
|
23
29
|
try:
|
|
24
30
|
wrap_function_wrapper(
|
|
25
31
|
"botocore.client",
|
|
@@ -234,6 +240,8 @@ class _BedrockProviderRequest(_ProviderRequest):
|
|
|
234
240
|
instrumentor=instrumentor,
|
|
235
241
|
category=PayiCategories.aws_bedrock,
|
|
236
242
|
streaming_type=_StreamingType.iterator,
|
|
243
|
+
module_name=BedrockInstrumentor._module_name,
|
|
244
|
+
module_version=BedrockInstrumentor._module_version,
|
|
237
245
|
is_aws_client=True,
|
|
238
246
|
)
|
|
239
247
|
|
|
@@ -5,12 +5,18 @@ from wrapt import wrap_function_wrapper # type: ignore
|
|
|
5
5
|
|
|
6
6
|
from .instrument import _ChunkResult, _IsStreaming, _PayiInstrumentor
|
|
7
7
|
from .VertexRequest import _VertexRequest
|
|
8
|
+
from .version_helper import get_version_helper
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class GoogleGenAiInstrumentor:
|
|
12
|
+
_module_name: str = "google-genai"
|
|
13
|
+
_module_version: str = ""
|
|
14
|
+
|
|
11
15
|
@staticmethod
|
|
12
16
|
def instrument(instrumentor: _PayiInstrumentor) -> None:
|
|
13
17
|
try:
|
|
18
|
+
GoogleGenAiInstrumentor._module_version = get_version_helper(GoogleGenAiInstrumentor._module_name)
|
|
19
|
+
|
|
14
20
|
wrap_function_wrapper(
|
|
15
21
|
"google.genai.models",
|
|
16
22
|
"Models.generate_content",
|
|
@@ -115,6 +121,8 @@ class _GoogleGenAiRequest(_VertexRequest):
|
|
|
115
121
|
def __init__(self, instrumentor: _PayiInstrumentor):
|
|
116
122
|
super().__init__(
|
|
117
123
|
instrumentor=instrumentor,
|
|
124
|
+
module_name=GoogleGenAiInstrumentor._module_name,
|
|
125
|
+
module_version=GoogleGenAiInstrumentor._module_version,
|
|
118
126
|
)
|
|
119
127
|
self._prompt_character_count = 0
|
|
120
128
|
self._candidates_character_count = 0
|
|
@@ -10,9 +10,13 @@ from payi.lib.helpers import PayiCategories, PayiHeaderNames
|
|
|
10
10
|
from payi.types.ingest_units_params import Units
|
|
11
11
|
|
|
12
12
|
from .instrument import _ChunkResult, _IsStreaming, _StreamingType, _ProviderRequest, _PayiInstrumentor
|
|
13
|
+
from .version_helper import get_version_helper
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class OpenAiInstrumentor:
|
|
17
|
+
_module_name: str = "openai"
|
|
18
|
+
_module_version: str = ""
|
|
19
|
+
|
|
16
20
|
@staticmethod
|
|
17
21
|
def is_azure(instance: Any) -> bool:
|
|
18
22
|
from openai import AzureOpenAI, AsyncAzureOpenAI # type: ignore # noqa: I001
|
|
@@ -22,6 +26,8 @@ class OpenAiInstrumentor:
|
|
|
22
26
|
@staticmethod
|
|
23
27
|
def instrument(instrumentor: _PayiInstrumentor) -> None:
|
|
24
28
|
try:
|
|
29
|
+
OpenAiInstrumentor._module_version = get_version_helper(OpenAiInstrumentor._module_name)
|
|
30
|
+
|
|
25
31
|
wrap_function_wrapper(
|
|
26
32
|
"openai.resources.chat.completions",
|
|
27
33
|
"Completions.create",
|
|
@@ -187,6 +193,8 @@ class _OpenAiProviderRequest(_ProviderRequest):
|
|
|
187
193
|
instrumentor=instrumentor,
|
|
188
194
|
category=PayiCategories.openai,
|
|
189
195
|
streaming_type=_StreamingType.iterator,
|
|
196
|
+
module_name=OpenAiInstrumentor._module_name,
|
|
197
|
+
module_version=OpenAiInstrumentor._module_version,
|
|
190
198
|
)
|
|
191
199
|
self._input_tokens_key = input_tokens_key
|
|
192
200
|
self._output_tokens_key = output_tokens_key
|
|
@@ -5,12 +5,18 @@ from wrapt import wrap_function_wrapper # type: ignore
|
|
|
5
5
|
|
|
6
6
|
from .instrument import _ChunkResult, _IsStreaming, _PayiInstrumentor
|
|
7
7
|
from .VertexRequest import _VertexRequest
|
|
8
|
+
from .version_helper import get_version_helper
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class VertexInstrumentor:
|
|
12
|
+
_module_name: str = "google-cloud-aiplatform"
|
|
13
|
+
_module_version: str = ""
|
|
14
|
+
|
|
11
15
|
@staticmethod
|
|
12
16
|
def instrument(instrumentor: _PayiInstrumentor) -> None:
|
|
13
17
|
try:
|
|
18
|
+
VertexInstrumentor._module_version = get_version_helper(VertexInstrumentor._module_name)
|
|
19
|
+
|
|
14
20
|
wrap_function_wrapper(
|
|
15
21
|
"vertexai.generative_models",
|
|
16
22
|
"GenerativeModel.generate_content",
|
|
@@ -85,6 +91,8 @@ class _GoogleVertexRequest(_VertexRequest):
|
|
|
85
91
|
def __init__(self, instrumentor: _PayiInstrumentor):
|
|
86
92
|
super().__init__(
|
|
87
93
|
instrumentor=instrumentor,
|
|
94
|
+
module_name=VertexInstrumentor._module_name,
|
|
95
|
+
module_version=VertexInstrumentor._module_version,
|
|
88
96
|
)
|
|
89
97
|
self._prompt_character_count = 0
|
|
90
98
|
self._candidates_character_count = 0
|
|
@@ -10,11 +10,20 @@ from .instrument import _ChunkResult, _StreamingType, _ProviderRequest, _PayiIns
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class _VertexRequest(_ProviderRequest): # type: ignore
|
|
13
|
-
|
|
13
|
+
KNOWN_MODALITIES = ("VIDEO", "AUDIO", "TEXT", "VISION", "IMAGE")
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
instrumentor: _PayiInstrumentor,
|
|
18
|
+
module_name: str,
|
|
19
|
+
module_version: str
|
|
20
|
+
) -> None:
|
|
14
21
|
super().__init__(
|
|
15
22
|
instrumentor=instrumentor,
|
|
16
23
|
category=PayiCategories.google_vertex,
|
|
17
24
|
streaming_type=_StreamingType.generator,
|
|
25
|
+
module_name=module_name,
|
|
26
|
+
module_version=module_version,
|
|
18
27
|
is_google_vertex_or_genai_client=True,
|
|
19
28
|
)
|
|
20
29
|
self._prompt_character_count = 0
|
|
@@ -154,6 +163,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
|
|
|
154
163
|
|
|
155
164
|
prompt_tokens_details: list[dict[str, Any]] = usage.get("prompt_tokens_details", [])
|
|
156
165
|
candidates_tokens_details: list[dict[str, Any]] = usage.get("candidates_tokens_details", [])
|
|
166
|
+
cache_tokens_details: list[dict[str, Any]] = usage.get("cache_tokens_details", [])
|
|
157
167
|
|
|
158
168
|
if not model:
|
|
159
169
|
model = ""
|
|
@@ -214,27 +224,50 @@ class _VertexRequest(_ProviderRequest): # type: ignore
|
|
|
214
224
|
if is_large_context_token_model(model, input):
|
|
215
225
|
large_context = "_large_context"
|
|
216
226
|
|
|
227
|
+
cache_details: dict[str, int] = {}
|
|
228
|
+
|
|
229
|
+
for details in cache_tokens_details:
|
|
230
|
+
modality = details.get("modality", "")
|
|
231
|
+
if not modality:
|
|
232
|
+
continue
|
|
233
|
+
|
|
234
|
+
modality_token_count = details.get("token_count", 0)
|
|
235
|
+
|
|
236
|
+
if modality == "IMAGE":
|
|
237
|
+
modality = "VISION"
|
|
238
|
+
|
|
239
|
+
if modality in _VertexRequest.KNOWN_MODALITIES:
|
|
240
|
+
cache_details[modality] = modality_token_count
|
|
241
|
+
add_units(self, modality.lower() + "_cache_read" + large_context, input=modality_token_count)
|
|
242
|
+
|
|
217
243
|
for details in prompt_tokens_details:
|
|
218
244
|
modality = details.get("modality", "")
|
|
219
245
|
if not modality:
|
|
220
246
|
continue
|
|
221
247
|
|
|
222
248
|
modality_token_count = details.get("token_count", 0)
|
|
249
|
+
|
|
223
250
|
if modality == "IMAGE":
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
251
|
+
modality = "VISION"
|
|
252
|
+
|
|
253
|
+
if modality in _VertexRequest.KNOWN_MODALITIES:
|
|
254
|
+
# Subtract cache_details value if modality is present, floor at zero
|
|
255
|
+
if modality in cache_details:
|
|
256
|
+
modality_token_count = max(0, modality_token_count - cache_details[modality])
|
|
257
|
+
|
|
258
|
+
add_units(self, modality.lower() + large_context, input=modality_token_count)
|
|
259
|
+
|
|
227
260
|
for details in candidates_tokens_details:
|
|
228
261
|
modality = details.get("modality", "")
|
|
229
262
|
if not modality:
|
|
230
263
|
continue
|
|
231
264
|
|
|
232
265
|
modality_token_count = details.get("token_count", 0)
|
|
233
|
-
if modality in
|
|
234
|
-
add_units(self, modality.lower()+large_context, output=modality_token_count)
|
|
266
|
+
if modality in _VertexRequest.KNOWN_MODALITIES:
|
|
267
|
+
add_units(self, modality.lower() + large_context, output=modality_token_count)
|
|
235
268
|
|
|
236
269
|
if thinking_token_count > 0:
|
|
237
|
-
add_units(self, "reasoning"+large_context, output=thinking_token_count)
|
|
270
|
+
add_units(self, "reasoning" + large_context, output=thinking_token_count)
|
|
238
271
|
|
|
239
272
|
if not self._ingest["units"]:
|
|
240
273
|
input = usage.get("prompt_token_count", 0)
|