gmt-python-sdk 0.15.0__tar.gz → 0.17.0__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 gmt-python-sdk might be problematic. Click here for more details.

Files changed (112) hide show
  1. gmt_python_sdk-0.17.0/.release-please-manifest.json +3 -0
  2. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/CHANGELOG.md +21 -0
  3. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/PKG-INFO +1 -1
  4. gmt_python_sdk-0.17.0/api.md +94 -0
  5. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/pyproject.toml +1 -1
  6. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/requirements-dev.lock +9 -9
  7. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_client.py +27 -12
  8. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_version.py +1 -1
  9. gmt_python_sdk-0.17.0/src/gmt/resources/profile.py +370 -0
  10. gmt_python_sdk-0.17.0/src/gmt/resources/purchases/__init__.py +33 -0
  11. gmt_python_sdk-0.17.0/src/gmt/resources/purchases/bulk.py +394 -0
  12. {gmt_python_sdk-0.15.0/src/gmt/resources → gmt_python_sdk-0.17.0/src/gmt/resources/purchases}/purchases.py +45 -13
  13. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/__init__.py +5 -0
  14. gmt_python_sdk-0.17.0/src/gmt/types/profile_change_login_params.py +12 -0
  15. gmt_python_sdk-0.17.0/src/gmt/types/profile_change_login_response.py +10 -0
  16. gmt_python_sdk-0.17.0/src/gmt/types/profile_change_password_params.py +16 -0
  17. gmt_python_sdk-0.17.0/src/gmt/types/profile_change_password_response.py +10 -0
  18. gmt_python_sdk-0.17.0/src/gmt/types/profile_unbind_telegram_response.py +10 -0
  19. gmt_python_sdk-0.17.0/src/gmt/types/purchases/__init__.py +7 -0
  20. gmt_python_sdk-0.17.0/src/gmt/types/purchases/bulk_create_params.py +25 -0
  21. gmt_python_sdk-0.17.0/src/gmt/types/purchases/bulk_create_response.py +76 -0
  22. gmt_python_sdk-0.17.0/src/gmt/types/purchases/bulk_retrieve_response.py +76 -0
  23. gmt_python_sdk-0.17.0/tests/api_resources/purchases/__init__.py +1 -0
  24. gmt_python_sdk-0.17.0/tests/api_resources/purchases/test_bulk.py +286 -0
  25. gmt_python_sdk-0.17.0/tests/api_resources/test_profile.py +277 -0
  26. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_client.py +23 -9
  27. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/uv.lock +328 -328
  28. gmt_python_sdk-0.15.0/.release-please-manifest.json +0 -3
  29. gmt_python_sdk-0.15.0/api.md +0 -72
  30. gmt_python_sdk-0.15.0/src/gmt/resources/profile.py +0 -141
  31. gmt_python_sdk-0.15.0/tests/api_resources/test_profile.py +0 -80
  32. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/.gitignore +0 -0
  33. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/CONTRIBUTING.md +0 -0
  34. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/LICENSE +0 -0
  35. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/README.md +0 -0
  36. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/SECURITY.md +0 -0
  37. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/bin/check-release-environment +0 -0
  38. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/bin/publish-pypi +0 -0
  39. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/examples/.keep +0 -0
  40. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/release-please-config.json +0 -0
  41. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/__init__.py +0 -0
  42. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_base_client.py +0 -0
  43. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_compat.py +0 -0
  44. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_constants.py +0 -0
  45. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_exceptions.py +0 -0
  46. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_files.py +0 -0
  47. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_models.py +0 -0
  48. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_qs.py +0 -0
  49. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_resource.py +0 -0
  50. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_response.py +0 -0
  51. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_streaming.py +0 -0
  52. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_types.py +0 -0
  53. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/__init__.py +0 -0
  54. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_compat.py +0 -0
  55. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_datetime_parse.py +0 -0
  56. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_json.py +0 -0
  57. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_logs.py +0 -0
  58. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_proxy.py +0 -0
  59. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_reflection.py +0 -0
  60. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_resources_proxy.py +0 -0
  61. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_streams.py +0 -0
  62. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_sync.py +0 -0
  63. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_transform.py +0 -0
  64. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_typing.py +0 -0
  65. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/_utils/_utils.py +0 -0
  66. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/lib/.keep +0 -0
  67. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/pagination.py +0 -0
  68. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/py.typed +0 -0
  69. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/resources/__init__.py +0 -0
  70. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/resources/accounts.py +0 -0
  71. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/resources/service.py +0 -0
  72. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/resources/webhooks.py +0 -0
  73. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/account_list_countries_params.py +0 -0
  74. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/account_list_countries_response.py +0 -0
  75. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/account_list_params.py +0 -0
  76. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/account_list_response.py +0 -0
  77. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/account_retrieve_response.py +0 -0
  78. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/profile_retrieve_response.py +0 -0
  79. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_create_params.py +0 -0
  80. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_create_response.py +0 -0
  81. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_list_params.py +0 -0
  82. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_list_response.py +0 -0
  83. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_refund_response.py +0 -0
  84. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
  85. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_request_verification_code_response.py +0 -0
  86. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/purchase_retrieve_response.py +0 -0
  87. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/service_get_server_time_response.py +0 -0
  88. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/service_health_check_response.py +0 -0
  89. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/webhook_test_params.py +0 -0
  90. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/src/gmt/types/webhook_test_response.py +0 -0
  91. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/__init__.py +0 -0
  92. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/api_resources/__init__.py +0 -0
  93. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/api_resources/test_accounts.py +0 -0
  94. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/api_resources/test_purchases.py +0 -0
  95. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/api_resources/test_service.py +0 -0
  96. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/api_resources/test_webhooks.py +0 -0
  97. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/conftest.py +0 -0
  98. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/sample_file.txt +0 -0
  99. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_deepcopy.py +0 -0
  100. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_extract_files.py +0 -0
  101. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_files.py +0 -0
  102. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_models.py +0 -0
  103. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_qs.py +0 -0
  104. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_required_args.py +0 -0
  105. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_response.py +0 -0
  106. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_streaming.py +0 -0
  107. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_transform.py +0 -0
  108. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_utils/test_datetime_parse.py +0 -0
  109. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_utils/test_json.py +0 -0
  110. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_utils/test_proxy.py +0 -0
  111. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/test_utils/test_typing.py +0 -0
  112. {gmt_python_sdk-0.15.0 → gmt_python_sdk-0.17.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.17.0"
3
+ }
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0 (2026-02-10)
4
+
5
+ Full Changelog: [v0.16.0...v0.17.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.16.0...v0.17.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([ac3b39a](https://github.com/cameo6/gmt-python-sdk/commit/ac3b39a6c26577cfb7a62410c549e2910acbc476))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** bump dependencies ([e98c11d](https://github.com/cameo6/gmt-python-sdk/commit/e98c11d38a93596333398b891afbe0a2fb3d3449))
15
+
16
+ ## 0.16.0 (2026-02-09)
17
+
18
+ Full Changelog: [v0.15.0...v0.16.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.15.0...v0.16.0)
19
+
20
+ ### Features
21
+
22
+ * **api:** manual updates ([6815298](https://github.com/cameo6/gmt-python-sdk/commit/68152986071f9667f88067fab0b0eb641949e5f6))
23
+
3
24
  ## 0.15.0 (2026-02-09)
4
25
 
5
26
  Full Changelog: [v0.14.0...v0.15.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.14.0...v0.15.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gmt-python-sdk
3
- Version: 0.15.0
3
+ Version: 0.17.0
4
4
  Summary: The official Python library for the gmt API
5
5
  Project-URL: Homepage, https://github.com/cameo6/gmt-python-sdk
6
6
  Project-URL: Repository, https://github.com/cameo6/gmt-python-sdk
@@ -0,0 +1,94 @@
1
+ # Service
2
+
3
+ Types:
4
+
5
+ ```python
6
+ from gmt.types import ServiceGetServerTimeResponse, ServiceHealthCheckResponse
7
+ ```
8
+
9
+ Methods:
10
+
11
+ - <code title="get /v1/service/time">client.service.<a href="./src/gmt/resources/service.py">get_server_time</a>() -> <a href="./src/gmt/types/service_get_server_time_response.py">ServiceGetServerTimeResponse</a></code>
12
+ - <code title="get /v1/service/health">client.service.<a href="./src/gmt/resources/service.py">health_check</a>() -> <a href="./src/gmt/types/service_health_check_response.py">ServiceHealthCheckResponse</a></code>
13
+
14
+ # Accounts
15
+
16
+ Types:
17
+
18
+ ```python
19
+ from gmt.types import AccountRetrieveResponse, AccountListResponse, AccountListCountriesResponse
20
+ ```
21
+
22
+ Methods:
23
+
24
+ - <code title="get /v1/accounts/{country_code}">client.accounts.<a href="./src/gmt/resources/accounts.py">retrieve</a>(country_code) -> <a href="./src/gmt/types/account_retrieve_response.py">AccountRetrieveResponse</a></code>
25
+ - <code title="get /v1/accounts/">client.accounts.<a href="./src/gmt/resources/accounts.py">list</a>(\*\*<a href="src/gmt/types/account_list_params.py">params</a>) -> <a href="./src/gmt/types/account_list_response.py">SyncPageNumber[AccountListResponse]</a></code>
26
+ - <code title="get /v1/accounts/countries">client.accounts.<a href="./src/gmt/resources/accounts.py">list_countries</a>(\*\*<a href="src/gmt/types/account_list_countries_params.py">params</a>) -> <a href="./src/gmt/types/account_list_countries_response.py">SyncPageNumber[AccountListCountriesResponse]</a></code>
27
+
28
+ # Profile
29
+
30
+ Types:
31
+
32
+ ```python
33
+ from gmt.types import (
34
+ ProfileRetrieveResponse,
35
+ ProfileChangeLoginResponse,
36
+ ProfileChangePasswordResponse,
37
+ ProfileUnbindTelegramResponse,
38
+ )
39
+ ```
40
+
41
+ Methods:
42
+
43
+ - <code title="get /v1/profile/">client.profile.<a href="./src/gmt/resources/profile.py">retrieve</a>() -> <a href="./src/gmt/types/profile_retrieve_response.py">ProfileRetrieveResponse</a></code>
44
+ - <code title="patch /v1/profile/change-login">client.profile.<a href="./src/gmt/resources/profile.py">change_login</a>(\*\*<a href="src/gmt/types/profile_change_login_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_login_response.py">ProfileChangeLoginResponse</a></code>
45
+ - <code title="patch /v1/profile/change-password">client.profile.<a href="./src/gmt/resources/profile.py">change_password</a>(\*\*<a href="src/gmt/types/profile_change_password_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_password_response.py">ProfileChangePasswordResponse</a></code>
46
+ - <code title="patch /v1/profile/unbind-telegram">client.profile.<a href="./src/gmt/resources/profile.py">unbind_telegram</a>() -> <a href="./src/gmt/types/profile_unbind_telegram_response.py">ProfileUnbindTelegramResponse</a></code>
47
+
48
+ # Purchases
49
+
50
+ Types:
51
+
52
+ ```python
53
+ from gmt.types import (
54
+ PurchaseCreateResponse,
55
+ PurchaseRetrieveResponse,
56
+ PurchaseListResponse,
57
+ PurchaseRefundResponse,
58
+ PurchaseRequestVerificationCodeResponse,
59
+ )
60
+ ```
61
+
62
+ Methods:
63
+
64
+ - <code title="post /v1/purchases/">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">create</a>(\*\*<a href="src/gmt/types/purchase_create_params.py">params</a>) -> <a href="./src/gmt/types/purchase_create_response.py">PurchaseCreateResponse</a></code>
65
+ - <code title="get /v1/purchases/{purchase_id}">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">retrieve</a>(purchase_id) -> <a href="./src/gmt/types/purchase_retrieve_response.py">PurchaseRetrieveResponse</a></code>
66
+ - <code title="get /v1/purchases/">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">list</a>(\*\*<a href="src/gmt/types/purchase_list_params.py">params</a>) -> <a href="./src/gmt/types/purchase_list_response.py">SyncPageNumber[PurchaseListResponse]</a></code>
67
+ - <code title="post /v1/purchases/{purchase_id}/refund">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">refund</a>(purchase_id) -> <a href="./src/gmt/types/purchase_refund_response.py">PurchaseRefundResponse</a></code>
68
+ - <code title="post /v1/purchases/{purchase_id}/request-code">client.purchases.<a href="./src/gmt/resources/purchases/purchases.py">request_verification_code</a>(purchase_id, \*\*<a href="src/gmt/types/purchase_request_verification_code_params.py">params</a>) -> <a href="./src/gmt/types/purchase_request_verification_code_response.py">PurchaseRequestVerificationCodeResponse</a></code>
69
+
70
+ ## Bulk
71
+
72
+ Types:
73
+
74
+ ```python
75
+ from gmt.types.purchases import BulkCreateResponse, BulkRetrieveResponse
76
+ ```
77
+
78
+ Methods:
79
+
80
+ - <code title="post /v1/purchases/bulk">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">create</a>(\*\*<a href="src/gmt/types/purchases/bulk_create_params.py">params</a>) -> <a href="./src/gmt/types/purchases/bulk_create_response.py">BulkCreateResponse</a></code>
81
+ - <code title="get /v1/purchases/bulk/{purchaseId}">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">retrieve</a>(purchase_id) -> <a href="./src/gmt/types/purchases/bulk_retrieve_response.py">BulkRetrieveResponse</a></code>
82
+ - <code title="get /v1/purchases/bulk/{purchaseId}/download">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">download</a>(purchase_id) -> None</code>
83
+
84
+ # Webhooks
85
+
86
+ Types:
87
+
88
+ ```python
89
+ from gmt.types import WebhookTestResponse
90
+ ```
91
+
92
+ Methods:
93
+
94
+ - <code title="post /v1/webhooks/test">client.webhooks.<a href="./src/gmt/resources/webhooks.py">test</a>(\*\*<a href="src/gmt/types/webhook_test_params.py">params</a>) -> <a href="./src/gmt/types/webhook_test_response.py">WebhookTestResponse</a></code>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gmt-python-sdk"
3
- version = "0.15.0"
3
+ version = "0.17.0"
4
4
  description = "The official Python library for the gmt API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -3,13 +3,13 @@
3
3
  -e .
4
4
  annotated-types==0.7.0
5
5
  # via pydantic
6
- anyio==4.12.0
6
+ anyio==4.12.1
7
7
  # via
8
8
  # gmt-python-sdk
9
9
  # httpx
10
10
  backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
11
11
  # via pytest-asyncio
12
- certifi==2025.11.12
12
+ certifi==2026.1.4
13
13
  # via
14
14
  # httpcore
15
15
  # httpx
@@ -36,7 +36,7 @@ idna==3.11
36
36
  # via
37
37
  # anyio
38
38
  # httpx
39
- importlib-metadata==8.7.0
39
+ importlib-metadata==8.7.1
40
40
  iniconfig==2.1.0 ; python_full_version < '3.10'
41
41
  # via pytest
42
42
  iniconfig==2.3.0 ; python_full_version >= '3.10'
@@ -50,11 +50,11 @@ mdurl==0.1.2
50
50
  mypy==1.17.0
51
51
  mypy-extensions==1.1.0
52
52
  # via mypy
53
- nodeenv==1.9.1
53
+ nodeenv==1.10.0
54
54
  # via pyright
55
55
  packaging==25.0
56
56
  # via pytest
57
- pathspec==0.12.1
57
+ pathspec==1.0.3
58
58
  # via mypy
59
59
  pluggy==1.6.0
60
60
  # via pytest
@@ -71,7 +71,7 @@ pytest==8.4.2 ; python_full_version < '3.10'
71
71
  # via
72
72
  # pytest-asyncio
73
73
  # pytest-xdist
74
- pytest==9.0.1 ; python_full_version >= '3.10'
74
+ pytest==9.0.2 ; python_full_version >= '3.10'
75
75
  # via
76
76
  # pytest-asyncio
77
77
  # pytest-xdist
@@ -82,14 +82,14 @@ python-dateutil==2.9.0.post0 ; python_full_version < '3.10'
82
82
  # via time-machine
83
83
  respx==0.22.0
84
84
  rich==14.2.0
85
- ruff==0.14.7
85
+ ruff==0.14.13
86
86
  six==1.17.0 ; python_full_version < '3.10'
87
87
  # via python-dateutil
88
88
  sniffio==1.3.1
89
89
  # via gmt-python-sdk
90
90
  time-machine==2.19.0 ; python_full_version < '3.10'
91
- time-machine==3.1.0 ; python_full_version >= '3.10'
92
- tomli==2.3.0 ; python_full_version < '3.11'
91
+ time-machine==3.2.0 ; python_full_version >= '3.10'
92
+ tomli==2.4.0 ; python_full_version < '3.11'
93
93
  # via
94
94
  # mypy
95
95
  # pytest
@@ -12,6 +12,7 @@ from . import _exceptions
12
12
  from ._qs import Querystring
13
13
  from ._types import (
14
14
  Omit,
15
+ Headers,
15
16
  Timeout,
16
17
  NotGiven,
17
18
  Transport,
@@ -23,7 +24,7 @@ from ._utils import is_given, get_async_library
23
24
  from ._compat import cached_property
24
25
  from ._version import __version__
25
26
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
26
- from ._exceptions import GmtError, APIStatusError
27
+ from ._exceptions import APIStatusError
27
28
  from ._base_client import (
28
29
  DEFAULT_MAX_RETRIES,
29
30
  SyncAPIClient,
@@ -36,14 +37,14 @@ if TYPE_CHECKING:
36
37
  from .resources.service import ServiceResource, AsyncServiceResource
37
38
  from .resources.accounts import AccountsResource, AsyncAccountsResource
38
39
  from .resources.webhooks import WebhooksResource, AsyncWebhooksResource
39
- from .resources.purchases import PurchasesResource, AsyncPurchasesResource
40
+ from .resources.purchases.purchases import PurchasesResource, AsyncPurchasesResource
40
41
 
41
42
  __all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Gmt", "AsyncGmt", "Client", "AsyncClient"]
42
43
 
43
44
 
44
45
  class Gmt(SyncAPIClient):
45
46
  # client options
46
- api_key: str
47
+ api_key: str | None
47
48
 
48
49
  def __init__(
49
50
  self,
@@ -74,10 +75,6 @@ class Gmt(SyncAPIClient):
74
75
  """
75
76
  if api_key is None:
76
77
  api_key = os.environ.get("x-api-key")
77
- if api_key is None:
78
- raise GmtError(
79
- "The api_key client option must be set either by passing api_key to the client or by setting the x-api-key environment variable"
80
- )
81
78
  self.api_key = api_key
82
79
 
83
80
  if base_url is None:
@@ -143,6 +140,8 @@ class Gmt(SyncAPIClient):
143
140
  @override
144
141
  def auth_headers(self) -> dict[str, str]:
145
142
  api_key = self.api_key
143
+ if api_key is None:
144
+ return {}
146
145
  return {"x-api-key": api_key}
147
146
 
148
147
  @property
@@ -154,6 +153,15 @@ class Gmt(SyncAPIClient):
154
153
  **self._custom_headers,
155
154
  }
156
155
 
156
+ @override
157
+ def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
158
+ if headers.get("x-api-key") or isinstance(custom_headers.get("x-api-key"), Omit):
159
+ return
160
+
161
+ raise TypeError(
162
+ '"Could not resolve authentication method. Expected the api_key to be set. Or for the `x-api-key` headers to be explicitly omitted"'
163
+ )
164
+
157
165
  def copy(
158
166
  self,
159
167
  *,
@@ -241,7 +249,7 @@ class Gmt(SyncAPIClient):
241
249
 
242
250
  class AsyncGmt(AsyncAPIClient):
243
251
  # client options
244
- api_key: str
252
+ api_key: str | None
245
253
 
246
254
  def __init__(
247
255
  self,
@@ -272,10 +280,6 @@ class AsyncGmt(AsyncAPIClient):
272
280
  """
273
281
  if api_key is None:
274
282
  api_key = os.environ.get("x-api-key")
275
- if api_key is None:
276
- raise GmtError(
277
- "The api_key client option must be set either by passing api_key to the client or by setting the x-api-key environment variable"
278
- )
279
283
  self.api_key = api_key
280
284
 
281
285
  if base_url is None:
@@ -341,6 +345,8 @@ class AsyncGmt(AsyncAPIClient):
341
345
  @override
342
346
  def auth_headers(self) -> dict[str, str]:
343
347
  api_key = self.api_key
348
+ if api_key is None:
349
+ return {}
344
350
  return {"x-api-key": api_key}
345
351
 
346
352
  @property
@@ -352,6 +358,15 @@ class AsyncGmt(AsyncAPIClient):
352
358
  **self._custom_headers,
353
359
  }
354
360
 
361
+ @override
362
+ def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
363
+ if headers.get("x-api-key") or isinstance(custom_headers.get("x-api-key"), Omit):
364
+ return
365
+
366
+ raise TypeError(
367
+ '"Could not resolve authentication method. Expected the api_key to be set. Or for the `x-api-key` headers to be explicitly omitted"'
368
+ )
369
+
355
370
  def copy(
356
371
  self,
357
372
  *,
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "gmt"
4
- __version__ = "0.15.0" # x-release-please-version
4
+ __version__ = "0.17.0" # x-release-please-version