meshtrade 0.0.7__py3-none-any.whl → 0.0.10__py3-none-any.whl

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 meshtrade might be problematic. Click here for more details.

Files changed (154) hide show
  1. buf/validate/validate_pb2.py +450 -0
  2. buf/validate/validate_pb2.pyi +627 -0
  3. meshtrade/common/__init__.py +28 -0
  4. meshtrade/common/config.py +30 -0
  5. meshtrade/common/grpc_client.py +202 -0
  6. meshtrade/compliance/client/v1/__init__.py +89 -0
  7. meshtrade/compliance/client/v1/client_pb2.py +2 -2
  8. meshtrade/compliance/client/v1/client_pb2_grpc.py +4 -0
  9. meshtrade/compliance/client/v1/company_pb2.py +2 -2
  10. meshtrade/compliance/client/v1/company_pb2_grpc.py +4 -0
  11. meshtrade/compliance/client/v1/company_representative_pb2.py +2 -2
  12. meshtrade/compliance/client/v1/company_representative_pb2_grpc.py +4 -0
  13. meshtrade/compliance/client/v1/company_representative_role_pb2.py +2 -2
  14. meshtrade/compliance/client/v1/company_representative_role_pb2_grpc.py +4 -0
  15. meshtrade/compliance/client/v1/fund_pb2.py +2 -2
  16. meshtrade/compliance/client/v1/fund_pb2_grpc.py +4 -0
  17. meshtrade/compliance/client/v1/identification_document_type_pb2.py +2 -2
  18. meshtrade/compliance/client/v1/identification_document_type_pb2_grpc.py +4 -0
  19. meshtrade/compliance/client/v1/industry_classification_pb2.py +2 -2
  20. meshtrade/compliance/client/v1/industry_classification_pb2_grpc.py +4 -0
  21. meshtrade/compliance/client/v1/natural_person_connection_type_pb2.py +2 -2
  22. meshtrade/compliance/client/v1/natural_person_connection_type_pb2_grpc.py +4 -0
  23. meshtrade/compliance/client/v1/natural_person_pb2.py +2 -2
  24. meshtrade/compliance/client/v1/natural_person_pb2_grpc.py +4 -0
  25. meshtrade/compliance/client/v1/pep_status_pb2.py +2 -2
  26. meshtrade/compliance/client/v1/pep_status_pb2_grpc.py +4 -0
  27. meshtrade/compliance/client/v1/service_meshpy.py +186 -0
  28. meshtrade/compliance/client/v1/service_options_meshpy.py +65 -0
  29. meshtrade/compliance/client/v1/service_pb2.py +20 -10
  30. meshtrade/compliance/client/v1/service_pb2.pyi +8 -0
  31. meshtrade/compliance/client/v1/service_pb2_grpc.py +192 -0
  32. meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2.py +2 -2
  33. meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2_grpc.py +4 -0
  34. meshtrade/compliance/client/v1/tax_residency_pb2.py +2 -2
  35. meshtrade/compliance/client/v1/tax_residency_pb2_grpc.py +4 -0
  36. meshtrade/compliance/client/v1/trust_pb2.py +2 -2
  37. meshtrade/compliance/client/v1/trust_pb2_grpc.py +4 -0
  38. meshtrade/compliance/client/v1/verification_status_pb2.py +2 -2
  39. meshtrade/compliance/client/v1/verification_status_pb2_grpc.py +4 -0
  40. meshtrade/iam/api_user/v1/__init__.py +99 -0
  41. meshtrade/iam/api_user/v1/api_credentials.py +156 -0
  42. meshtrade/iam/api_user/v1/api_credentials_pb2.py +42 -0
  43. meshtrade/iam/api_user/v1/api_credentials_pb2.pyi +14 -0
  44. meshtrade/iam/api_user/v1/api_credentials_pb2_grpc.py +4 -0
  45. meshtrade/iam/api_user/v1/api_user_pb2.py +48 -0
  46. meshtrade/iam/api_user/v1/api_user_pb2.pyi +49 -0
  47. meshtrade/iam/api_user/v1/api_user_pb2_grpc.py +4 -0
  48. meshtrade/iam/api_user/v1/service.py +58 -0
  49. meshtrade/iam/api_user/v1/service_meshpy.py +255 -0
  50. meshtrade/iam/api_user/v1/service_options_meshpy.py +65 -0
  51. meshtrade/iam/api_user/v1/service_pb2.py +77 -0
  52. meshtrade/iam/api_user/v1/service_pb2.pyi +63 -0
  53. meshtrade/iam/api_user/v1/service_pb2_grpc.py +458 -0
  54. meshtrade/iam/group/v1/__init__.py +63 -0
  55. meshtrade/iam/group/v1/group_pb2.py +2 -2
  56. meshtrade/iam/group/v1/group_pb2_grpc.py +4 -0
  57. meshtrade/iam/group/v1/service_meshpy.py +187 -0
  58. meshtrade/iam/group/v1/service_options_meshpy.py +65 -0
  59. meshtrade/iam/group/v1/service_pb2.py +22 -6
  60. meshtrade/iam/group/v1/service_pb2.pyi +29 -1
  61. meshtrade/iam/group/v1/service_pb2_grpc.py +170 -0
  62. meshtrade/iam/role/v1/__init__.py +44 -0
  63. meshtrade/iam/role/v1/role.py +23 -0
  64. meshtrade/iam/role/v1/role_pb2.py +40 -0
  65. meshtrade/{option/v1/auth_pb2.pyi → iam/role/v1/role_pb2.pyi} +16 -0
  66. meshtrade/iam/role/v1/role_pb2_grpc.py +4 -0
  67. meshtrade/iam/user/v1/__init__.py +53 -0
  68. meshtrade/iam/user/v1/service_meshpy.py +151 -0
  69. meshtrade/iam/user/v1/service_options_meshpy.py +65 -0
  70. meshtrade/iam/user/v1/service_pb2.py +51 -0
  71. meshtrade/iam/user/v1/service_pb2.pyi +19 -0
  72. meshtrade/iam/user/v1/service_pb2_grpc.py +82 -0
  73. meshtrade/{issuance_hub/instrument/v1/instrument_pb2.py → iam/user/v1/user_pb2.py} +7 -7
  74. meshtrade/iam/user/v1/user_pb2.pyi +15 -0
  75. meshtrade/iam/user/v1/user_pb2_grpc.py +4 -0
  76. meshtrade/ledger/transaction/v1/__init__.py +41 -0
  77. meshtrade/ledger/transaction/v1/transaction_action_pb2.py +2 -2
  78. meshtrade/ledger/transaction/v1/transaction_action_pb2_grpc.py +4 -0
  79. meshtrade/ledger/transaction/v1/transaction_state_pb2.py +2 -2
  80. meshtrade/ledger/transaction/v1/transaction_state_pb2_grpc.py +4 -0
  81. meshtrade/option/v1/__init__.py +39 -0
  82. meshtrade/option/v1/{service_type_pb2.py → method_type_pb2.py} +7 -7
  83. meshtrade/option/v1/method_type_pb2.pyi +17 -0
  84. meshtrade/option/v1/method_type_pb2_grpc.py +4 -0
  85. meshtrade/trading/limit_order/v1/__init__.py +53 -0
  86. meshtrade/trading/limit_order/v1/limit_order_pb2.py +2 -2
  87. meshtrade/trading/limit_order/v1/limit_order_pb2_grpc.py +4 -0
  88. meshtrade/trading/limit_order/v1/service_meshpy.py +151 -0
  89. meshtrade/trading/limit_order/v1/service_options_meshpy.py +65 -0
  90. meshtrade/trading/limit_order/v1/service_pb2.py +10 -6
  91. meshtrade/trading/limit_order/v1/service_pb2.pyi +2 -0
  92. meshtrade/trading/limit_order/v1/service_pb2_grpc.py +78 -0
  93. meshtrade/trading/market_order/v1/__init__.py +53 -0
  94. meshtrade/trading/{direct_order/v1/direct_order_pb2.py → market_order/v1/market_order_pb2.py} +7 -7
  95. meshtrade/{issuance_hub/instrument/v1/instrument_pb2.pyi → trading/market_order/v1/market_order_pb2.pyi} +1 -1
  96. meshtrade/trading/market_order/v1/market_order_pb2_grpc.py +4 -0
  97. meshtrade/trading/market_order/v1/service_meshpy.py +151 -0
  98. meshtrade/trading/market_order/v1/service_options_meshpy.py +65 -0
  99. meshtrade/trading/market_order/v1/service_pb2.py +44 -0
  100. meshtrade/trading/{spot → market_order}/v1/service_pb2.pyi +4 -2
  101. meshtrade/trading/market_order/v1/service_pb2_grpc.py +78 -0
  102. meshtrade/type/v1/__init__.py +120 -4
  103. meshtrade/type/v1/address_pb2.py +2 -2
  104. meshtrade/type/v1/address_pb2_grpc.py +4 -0
  105. meshtrade/type/v1/amount.py +2 -8
  106. meshtrade/type/v1/amount_pb2.py +2 -2
  107. meshtrade/type/v1/amount_pb2_grpc.py +4 -0
  108. meshtrade/type/v1/contact_details_pb2.py +2 -2
  109. meshtrade/type/v1/contact_details_pb2_grpc.py +4 -0
  110. meshtrade/type/v1/date.py +373 -0
  111. meshtrade/{trading/spot/v1/spot_pb2.py → type/v1/date_pb2.py} +7 -7
  112. meshtrade/type/v1/date_pb2.pyi +15 -0
  113. meshtrade/type/v1/date_pb2_grpc.py +4 -0
  114. meshtrade/type/v1/decimal_built_in_conversions.py +1 -1
  115. meshtrade/type/v1/decimal_pb2.py +2 -2
  116. meshtrade/type/v1/decimal_pb2_grpc.py +4 -0
  117. meshtrade/type/v1/ledger.py +2 -3
  118. meshtrade/type/v1/ledger_pb2.py +2 -2
  119. meshtrade/type/v1/ledger_pb2_grpc.py +4 -0
  120. meshtrade/type/v1/time_of_day.py +265 -0
  121. meshtrade/type/v1/time_of_day_pb2.py +37 -0
  122. meshtrade/type/v1/time_of_day_pb2.pyi +17 -0
  123. meshtrade/type/v1/time_of_day_pb2_grpc.py +4 -0
  124. meshtrade/type/v1/token_pb2.py +2 -2
  125. meshtrade/type/v1/token_pb2_grpc.py +4 -0
  126. meshtrade/wallet/account/v1/__init__.py +65 -0
  127. meshtrade/wallet/account/v1/account_pb2.py +2 -2
  128. meshtrade/wallet/account/v1/account_pb2_grpc.py +4 -0
  129. meshtrade/wallet/account/v1/service_meshpy.py +204 -0
  130. meshtrade/wallet/account/v1/service_options_meshpy.py +65 -0
  131. meshtrade/wallet/account/v1/service_pb2.py +18 -27
  132. meshtrade/wallet/account/v1/service_pb2.pyi +2 -3
  133. meshtrade/wallet/account/v1/service_pb2_grpc.py +222 -0
  134. meshtrade-0.0.10.dist-info/METADATA +95 -0
  135. meshtrade-0.0.10.dist-info/RECORD +173 -0
  136. {meshtrade-0.0.7.dist-info → meshtrade-0.0.10.dist-info}/top_level.txt +1 -0
  137. meshtrade/issuance_hub/instrument/v1/service_pb2.py +0 -49
  138. meshtrade/issuance_hub/instrument/v1/service_pb2.pyi +0 -46
  139. meshtrade/option/v1/auth_pb2.py +0 -40
  140. meshtrade/option/v1/service_type_pb2.pyi +0 -17
  141. meshtrade/trading/direct_order/v1/__init__.py +0 -0
  142. meshtrade/trading/direct_order/v1/direct_order_pb2.pyi +0 -11
  143. meshtrade/trading/direct_order/v1/service_pb2.py +0 -40
  144. meshtrade/trading/direct_order/v1/service_pb2.pyi +0 -12
  145. meshtrade/trading/spot/__init__.py +0 -0
  146. meshtrade/trading/spot/v1/__init__.py +0 -0
  147. meshtrade/trading/spot/v1/service_pb2.py +0 -40
  148. meshtrade/trading/spot/v1/spot_pb2.pyi +0 -11
  149. meshtrade-0.0.7.dist-info/METADATA +0 -35
  150. meshtrade-0.0.7.dist-info/RECORD +0 -102
  151. meshtrade-0.0.7.dist-info/licenses/LICENSE +0 -10
  152. /meshtrade/{iam/role → ledger}/__init__.py +0 -0
  153. /meshtrade/{trading/direct_order → ledger/transaction}/__init__.py +0 -0
  154. {meshtrade-0.0.7.dist-info → meshtrade-0.0.10.dist-info}/WHEEL +0 -0
@@ -0,0 +1,255 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/iam/api_user/v1/service.proto
3
+
4
+ """
5
+ ApiUserService gRPC service wrapper with authentication, timeouts, and resource management.
6
+
7
+ This module provides a high-level gRPC service for the ApiUserService service that combines
8
+ the service interface with resource management capabilities, providing authentication,
9
+ timeouts, and proper connection handling.
10
+ """
11
+
12
+ from datetime import timedelta
13
+ from typing import Optional
14
+
15
+ from meshtrade.common import BaseGRPCClient
16
+ from .api_credentials import find_credentials
17
+
18
+ from .api_user_pb2 import APIUser
19
+ from .service_options_meshpy import ServiceOptions
20
+ from .service_pb2 import (
21
+ ActivateApiUserRequest,
22
+ CreateApiUserRequest,
23
+ DeactivateApiUserRequest,
24
+ GetApiUserByKeyHashRequest,
25
+ GetApiUserRequest,
26
+ ListApiUsersRequest,
27
+ ListApiUsersResponse,
28
+ SearchApiUsersRequest,
29
+ SearchApiUsersResponse,
30
+ )
31
+ from .service_pb2_grpc import ApiUserServiceStub
32
+
33
+
34
+ def _create_apiuserservice_stub(channel):
35
+ """Factory function to create ApiUserServiceStub from gRPC channel."""
36
+ return ApiUserServiceStub(channel)
37
+
38
+
39
+ class ApiUserService(BaseGRPCClient):
40
+ """ApiUserService gRPC service with authentication, timeouts, and resource management.
41
+
42
+ This service provides a complete implementation of the ApiUserService with proper authentication, timeout handling, and automatic resource cleanup.
43
+
44
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/iam/api_user/v1
45
+
46
+ Basic service usage with default SDK Configuration:
47
+ ```python
48
+ service = ApiUserService()
49
+
50
+ with service: # `with` ensures proper clean up of underlying connection after use
51
+ response = service.get_api_user(request)
52
+ ```
53
+
54
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
55
+
56
+ 1. MESH_API_CREDENTIALS environment variable
57
+
58
+ 2. Default credential file location:
59
+
60
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
61
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
62
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
63
+
64
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
65
+
66
+ The service may also be configured with custom options:
67
+ ```python
68
+ from .service_options_meshpy import ServiceOptions
69
+ from datetime import timedelta
70
+
71
+ options = ServiceOptions(
72
+ url="api.staging.example.com",
73
+ port=443,
74
+ api_key="your-api-key",
75
+ group="groups/your-group-id",
76
+ timeout=timedelta(seconds=60)
77
+ )
78
+
79
+ service = ApiUserService(options)
80
+
81
+ with service: # `with` ensures proper clean up of underlying connection after use
82
+ response = service.get_api_user(request)
83
+ ```
84
+
85
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
86
+ """
87
+
88
+ def __init__(self, options: Optional[ServiceOptions] = None):
89
+ """Construct and initialize the ApiUserService service.
90
+
91
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/iam/api_user/v1
92
+
93
+ Args:
94
+ options: Optional ServiceOptions for configuring the service.
95
+ If None, service is constructed with default configuration.
96
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
97
+
98
+ 1. MESH_API_CREDENTIALS environment variable
99
+
100
+ 2. Default credential file location:
101
+
102
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
103
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
104
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
105
+
106
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
107
+
108
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
109
+
110
+ Example:
111
+ ```python
112
+ # construct with default configuration
113
+ service = ApiUserService()
114
+
115
+ # construct with custom configuration
116
+ options = ServiceOptions(
117
+ url="api.example.com",
118
+ api_key="your-key",
119
+ group="groups/your-group"
120
+ )
121
+ service = ApiUserService(options)
122
+ ```
123
+ """
124
+ if options is None:
125
+ options = ServiceOptions()
126
+
127
+ # Initialize the base client with all common functionality
128
+ super().__init__(
129
+ service_name="ApiUserService",
130
+ stub_factory=_create_apiuserservice_stub,
131
+ find_credentials_func=find_credentials,
132
+ url=options.url,
133
+ port=options.port,
134
+ api_key=options.api_key,
135
+ group=options.group,
136
+ timeout=options.timeout,
137
+ tls=options.tls,
138
+ )
139
+
140
+ def get_api_user(self, request: GetApiUserRequest, timeout: Optional[timedelta] = None) -> APIUser:
141
+ """GetApiUser method.
142
+
143
+ Args:
144
+ request: The GetApiUser request message
145
+ timeout: Optional timeout override for this call
146
+
147
+ Returns:
148
+ The GetApiUser response message
149
+
150
+ Raises:
151
+ grpc.RpcError: If the gRPC call fails
152
+ ValueError: If authentication credentials are missing
153
+ """
154
+ return self._execute_method("GetApiUser", request, timeout)
155
+
156
+ def create_api_user(self, request: CreateApiUserRequest, timeout: Optional[timedelta] = None) -> APIUser:
157
+ """CreateApiUser method.
158
+
159
+ Args:
160
+ request: The CreateApiUser request message
161
+ timeout: Optional timeout override for this call
162
+
163
+ Returns:
164
+ The CreateApiUser response message
165
+
166
+ Raises:
167
+ grpc.RpcError: If the gRPC call fails
168
+ ValueError: If authentication credentials are missing
169
+ """
170
+ return self._execute_method("CreateApiUser", request, timeout)
171
+
172
+ def list_api_users(self, request: ListApiUsersRequest, timeout: Optional[timedelta] = None) -> ListApiUsersResponse:
173
+ """ListApiUsers method.
174
+
175
+ Args:
176
+ request: The ListApiUsers request message
177
+ timeout: Optional timeout override for this call
178
+
179
+ Returns:
180
+ The ListApiUsers response message
181
+
182
+ Raises:
183
+ grpc.RpcError: If the gRPC call fails
184
+ ValueError: If authentication credentials are missing
185
+ """
186
+ return self._execute_method("ListApiUsers", request, timeout)
187
+
188
+ def search_api_users(self, request: SearchApiUsersRequest, timeout: Optional[timedelta] = None) -> SearchApiUsersResponse:
189
+ """SearchApiUsers method.
190
+
191
+ Args:
192
+ request: The SearchApiUsers request message
193
+ timeout: Optional timeout override for this call
194
+
195
+ Returns:
196
+ The SearchApiUsers response message
197
+
198
+ Raises:
199
+ grpc.RpcError: If the gRPC call fails
200
+ ValueError: If authentication credentials are missing
201
+ """
202
+ return self._execute_method("SearchApiUsers", request, timeout)
203
+
204
+ def activate_api_user(self, request: ActivateApiUserRequest, timeout: Optional[timedelta] = None) -> APIUser:
205
+ """ActivateApiUser method.
206
+
207
+ Args:
208
+ request: The ActivateApiUser request message
209
+ timeout: Optional timeout override for this call
210
+
211
+ Returns:
212
+ The ActivateApiUser response message
213
+
214
+ Raises:
215
+ grpc.RpcError: If the gRPC call fails
216
+ ValueError: If authentication credentials are missing
217
+ """
218
+ return self._execute_method("ActivateApiUser", request, timeout)
219
+
220
+ def deactivate_api_user(self, request: DeactivateApiUserRequest, timeout: Optional[timedelta] = None) -> APIUser:
221
+ """DeactivateApiUser method.
222
+
223
+ Args:
224
+ request: The DeactivateApiUser request message
225
+ timeout: Optional timeout override for this call
226
+
227
+ Returns:
228
+ The DeactivateApiUser response message
229
+
230
+ Raises:
231
+ grpc.RpcError: If the gRPC call fails
232
+ ValueError: If authentication credentials are missing
233
+ """
234
+ return self._execute_method("DeactivateApiUser", request, timeout)
235
+
236
+ def get_api_user_by_key_hash(self, request: GetApiUserByKeyHashRequest, timeout: Optional[timedelta] = None) -> APIUser:
237
+ """GetApiUserByKeyHash method.
238
+
239
+ Args:
240
+ request: The GetApiUserByKeyHash request message
241
+ timeout: Optional timeout override for this call
242
+
243
+ Returns:
244
+ The GetApiUserByKeyHash response message
245
+
246
+ Raises:
247
+ grpc.RpcError: If the gRPC call fails
248
+ ValueError: If authentication credentials are missing
249
+ """
250
+ return self._execute_method("GetApiUserByKeyHash", request, timeout)
251
+
252
+
253
+ # Create aliases to match expected exports
254
+ ApiUserServiceGRPCClient = ApiUserService
255
+ ApiUserServiceGRPCClientInterface = ApiUserService
@@ -0,0 +1,65 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/iam/api_user/v1/service.proto
3
+
4
+ """
5
+ Configuration options for ApiUserService gRPC service.
6
+ This module provides a clean, extensible way to configure the service with optional
7
+ parameters while maintaining backward compatibility and readability.
8
+ """
9
+
10
+ from datetime import timedelta
11
+
12
+
13
+ class ServiceOptions:
14
+ """Configuration options for ApiUserService gRPC service.
15
+
16
+ This class provides a clean, extensible way to configure the service with optional
17
+ parameters while maintaining backward compatibility and readability.
18
+ """
19
+
20
+ def __init__(
21
+ self,
22
+ tls: bool = True,
23
+ url: str | None = None,
24
+ port: int | None = None,
25
+ api_key: str | None = None,
26
+ group: str | None = None,
27
+ timeout: timedelta = timedelta(seconds=30),
28
+ ):
29
+ """Initialize service options.
30
+
31
+ Args:
32
+ tls: Whether to use TLS encryption for the gRPC connection.
33
+ When True, establishes a secure connection using TLS.
34
+ When False, uses an insecure connection.
35
+ Default: True (secure connection)
36
+
37
+ url: The server hostname or IP address (e.g., "api.example.com", "localhost").
38
+ Default: Uses DEFAULT_GRPC_URL from common module
39
+
40
+ port: The server port number (e.g., 443 for HTTPS, 8080 for development).
41
+ Default: Uses DEFAULT_GRPC_PORT from common module
42
+
43
+ api_key: The API key string (without "Bearer " prefix) for authentication.
44
+ The API key will be sent as a Bearer token in the Authorization header.
45
+ This is the primary authentication method for service-to-service communication.
46
+
47
+ group: The group resource name in format groups/{group_id} required for all API requests.
48
+ The group determines the authorization context for operations
49
+ and is sent as an "x-group" header with every request.
50
+
51
+ timeout: The default timeout for all gRPC method calls.
52
+ This timeout applies to individual method calls and helps prevent hanging requests.
53
+ If a request takes longer than the specified timeout, it will be cancelled.
54
+ Default: 30 seconds
55
+ """
56
+ self.tls = tls
57
+ self.url = url
58
+ self.port = port
59
+ self.api_key = api_key
60
+ self.group = group
61
+ self.timeout = timeout
62
+
63
+
64
+ # Create alias to match expected exports
65
+ ClientOptions = ServiceOptions
@@ -0,0 +1,77 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/iam/api_user/v1/service.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'meshtrade/iam/api_user/v1/service.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
26
+ from meshtrade.iam.api_user.v1 import api_user_pb2 as meshtrade_dot_iam_dot_api__user_dot_v1_dot_api__user__pb2
27
+ from meshtrade.iam.role.v1 import role_pb2 as meshtrade_dot_iam_dot_role_dot_v1_dot_role__pb2
28
+ from meshtrade.option.v1 import method_type_pb2 as meshtrade_dot_option_dot_v1_dot_method__type__pb2
29
+
30
+
31
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'meshtrade/iam/api_user/v1/service.proto\x12\x19meshtrade.iam.api_user.v1\x1a\x1b\x62uf/validate/validate.proto\x1a(meshtrade/iam/api_user/v1/api_user.proto\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\"\'\n\x11GetApiUserRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"7\n\x1aGetApiUserByKeyHashRequest\x12\x19\n\x08key_hash\x18\x01 \x01(\tR\x07keyHash\"U\n\x14\x43reateApiUserRequest\x12=\n\x08\x61pi_user\x18\x01 \x01(\x0b\x32\".meshtrade.iam.api_user.v1.APIUserR\x07\x61piUser\"\x15\n\x13ListApiUsersRequest\"W\n\x14ListApiUsersResponse\x12?\n\tapi_users\x18\x01 \x03(\x0b\x32\".meshtrade.iam.api_user.v1.APIUserR\x08\x61piUsers\":\n\x15SearchApiUsersRequest\x12!\n\x0c\x64isplay_name\x18\x01 \x01(\tR\x0b\x64isplayName\"Y\n\x16SearchApiUsersResponse\x12?\n\tapi_users\x18\x01 \x03(\x0b\x32\".meshtrade.iam.api_user.v1.APIUserR\x08\x61piUsers\"\xd9\x01\n\x16\x41\x63tivateApiUserRequest\x12\xbe\x01\n\x04name\x18\x01 \x01(\tB\xa9\x01\xbaH\xa5\x01r&\x10\x01\x32\"^api_users/[0-9A-HJKMNP-TV-Z]{26}$\xba\x01z\n\rname.required\x12\x35name is required and must be in format api_users/{id}\x1a\x32this.matches(\'^api_users/[0-9A-HJKMNP-TV-Z]{26}$\')R\x04name\"\xdb\x01\n\x18\x44\x65\x61\x63tivateApiUserRequest\x12\xbe\x01\n\x04name\x18\x01 \x01(\tB\xa9\x01\xbaH\xa5\x01r&\x10\x01\x32\"^api_users/[0-9A-HJKMNP-TV-Z]{26}$\xba\x01z\n\rname.required\x12\x35name is required and must be in format api_users/{id}\x1a\x32this.matches(\'^api_users/[0-9A-HJKMNP-TV-Z]{26}$\')R\x04name2\xe8\x06\n\x0e\x41piUserService\x12l\n\nGetApiUser\x12,.meshtrade.iam.api_user.v1.GetApiUserRequest\x1a\".meshtrade.iam.api_user.v1.APIUser\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x05\x06\x12q\n\rCreateApiUser\x12/.meshtrade.iam.api_user.v1.CreateApiUserRequest\x1a\".meshtrade.iam.api_user.v1.APIUser\"\x0b\xa0\xb5\x18\x02\xaa\xb5\x18\x03\n\x01\x05\x12}\n\x0cListApiUsers\x12..meshtrade.iam.api_user.v1.ListApiUsersRequest\x1a/.meshtrade.iam.api_user.v1.ListApiUsersResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x05\x06\x12\x83\x01\n\x0eSearchApiUsers\x12\x30.meshtrade.iam.api_user.v1.SearchApiUsersRequest\x1a\x31.meshtrade.iam.api_user.v1.SearchApiUsersResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x05\x06\x12u\n\x0f\x41\x63tivateApiUser\x12\x31.meshtrade.iam.api_user.v1.ActivateApiUserRequest\x1a\".meshtrade.iam.api_user.v1.APIUser\"\x0b\xa0\xb5\x18\x02\xaa\xb5\x18\x03\n\x01\x05\x12y\n\x11\x44\x65\x61\x63tivateApiUser\x12\x33.meshtrade.iam.api_user.v1.DeactivateApiUserRequest\x1a\".meshtrade.iam.api_user.v1.APIUser\"\x0b\xa0\xb5\x18\x02\xaa\xb5\x18\x03\n\x01\x05\x12~\n\x13GetApiUserByKeyHash\x12\x35.meshtrade.iam.api_user.v1.GetApiUserByKeyHashRequest\x1a\".meshtrade.iam.api_user.v1.APIUser\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x05\x06\x42Z\n co.meshtrade.api.iam.api_user.v1Z6github.com/meshtrade/api/go/iam/api_user/v1;api_userv1b\x06proto3')
32
+
33
+ _globals = globals()
34
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
35
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.iam.api_user.v1.service_pb2', _globals)
36
+ if not _descriptor._USE_C_DESCRIPTORS:
37
+ _globals['DESCRIPTOR']._loaded_options = None
38
+ _globals['DESCRIPTOR']._serialized_options = b'\n co.meshtrade.api.iam.api_user.v1Z6github.com/meshtrade/api/go/iam/api_user/v1;api_userv1'
39
+ _globals['_ACTIVATEAPIUSERREQUEST'].fields_by_name['name']._loaded_options = None
40
+ _globals['_ACTIVATEAPIUSERREQUEST'].fields_by_name['name']._serialized_options = b'\272H\245\001r&\020\0012\"^api_users/[0-9A-HJKMNP-TV-Z]{26}$\272\001z\n\rname.required\0225name is required and must be in format api_users/{id}\0322this.matches(\'^api_users/[0-9A-HJKMNP-TV-Z]{26}$\')'
41
+ _globals['_DEACTIVATEAPIUSERREQUEST'].fields_by_name['name']._loaded_options = None
42
+ _globals['_DEACTIVATEAPIUSERREQUEST'].fields_by_name['name']._serialized_options = b'\272H\245\001r&\020\0012\"^api_users/[0-9A-HJKMNP-TV-Z]{26}$\272\001z\n\rname.required\0225name is required and must be in format api_users/{id}\0322this.matches(\'^api_users/[0-9A-HJKMNP-TV-Z]{26}$\')'
43
+ _globals['_APIUSERSERVICE'].methods_by_name['GetApiUser']._loaded_options = None
44
+ _globals['_APIUSERSERVICE'].methods_by_name['GetApiUser']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\005\006'
45
+ _globals['_APIUSERSERVICE'].methods_by_name['CreateApiUser']._loaded_options = None
46
+ _globals['_APIUSERSERVICE'].methods_by_name['CreateApiUser']._serialized_options = b'\240\265\030\002\252\265\030\003\n\001\005'
47
+ _globals['_APIUSERSERVICE'].methods_by_name['ListApiUsers']._loaded_options = None
48
+ _globals['_APIUSERSERVICE'].methods_by_name['ListApiUsers']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\005\006'
49
+ _globals['_APIUSERSERVICE'].methods_by_name['SearchApiUsers']._loaded_options = None
50
+ _globals['_APIUSERSERVICE'].methods_by_name['SearchApiUsers']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\005\006'
51
+ _globals['_APIUSERSERVICE'].methods_by_name['ActivateApiUser']._loaded_options = None
52
+ _globals['_APIUSERSERVICE'].methods_by_name['ActivateApiUser']._serialized_options = b'\240\265\030\002\252\265\030\003\n\001\005'
53
+ _globals['_APIUSERSERVICE'].methods_by_name['DeactivateApiUser']._loaded_options = None
54
+ _globals['_APIUSERSERVICE'].methods_by_name['DeactivateApiUser']._serialized_options = b'\240\265\030\002\252\265\030\003\n\001\005'
55
+ _globals['_APIUSERSERVICE'].methods_by_name['GetApiUserByKeyHash']._loaded_options = None
56
+ _globals['_APIUSERSERVICE'].methods_by_name['GetApiUserByKeyHash']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\005\006'
57
+ _globals['_GETAPIUSERREQUEST']._serialized_start=214
58
+ _globals['_GETAPIUSERREQUEST']._serialized_end=253
59
+ _globals['_GETAPIUSERBYKEYHASHREQUEST']._serialized_start=255
60
+ _globals['_GETAPIUSERBYKEYHASHREQUEST']._serialized_end=310
61
+ _globals['_CREATEAPIUSERREQUEST']._serialized_start=312
62
+ _globals['_CREATEAPIUSERREQUEST']._serialized_end=397
63
+ _globals['_LISTAPIUSERSREQUEST']._serialized_start=399
64
+ _globals['_LISTAPIUSERSREQUEST']._serialized_end=420
65
+ _globals['_LISTAPIUSERSRESPONSE']._serialized_start=422
66
+ _globals['_LISTAPIUSERSRESPONSE']._serialized_end=509
67
+ _globals['_SEARCHAPIUSERSREQUEST']._serialized_start=511
68
+ _globals['_SEARCHAPIUSERSREQUEST']._serialized_end=569
69
+ _globals['_SEARCHAPIUSERSRESPONSE']._serialized_start=571
70
+ _globals['_SEARCHAPIUSERSRESPONSE']._serialized_end=660
71
+ _globals['_ACTIVATEAPIUSERREQUEST']._serialized_start=663
72
+ _globals['_ACTIVATEAPIUSERREQUEST']._serialized_end=880
73
+ _globals['_DEACTIVATEAPIUSERREQUEST']._serialized_start=883
74
+ _globals['_DEACTIVATEAPIUSERREQUEST']._serialized_end=1102
75
+ _globals['_APIUSERSERVICE']._serialized_start=1105
76
+ _globals['_APIUSERSERVICE']._serialized_end=1977
77
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,63 @@
1
+ from buf.validate import validate_pb2 as _validate_pb2
2
+ from meshtrade.iam.api_user.v1 import api_user_pb2 as _api_user_pb2
3
+ from meshtrade.iam.role.v1 import role_pb2 as _role_pb2
4
+ from meshtrade.option.v1 import method_type_pb2 as _method_type_pb2
5
+ from google.protobuf.internal import containers as _containers
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
9
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
10
+
11
+ DESCRIPTOR: _descriptor.FileDescriptor
12
+
13
+ class GetApiUserRequest(_message.Message):
14
+ __slots__ = ("name",)
15
+ NAME_FIELD_NUMBER: _ClassVar[int]
16
+ name: str
17
+ def __init__(self, name: _Optional[str] = ...) -> None: ...
18
+
19
+ class GetApiUserByKeyHashRequest(_message.Message):
20
+ __slots__ = ("key_hash",)
21
+ KEY_HASH_FIELD_NUMBER: _ClassVar[int]
22
+ key_hash: str
23
+ def __init__(self, key_hash: _Optional[str] = ...) -> None: ...
24
+
25
+ class CreateApiUserRequest(_message.Message):
26
+ __slots__ = ("api_user",)
27
+ API_USER_FIELD_NUMBER: _ClassVar[int]
28
+ api_user: _api_user_pb2.APIUser
29
+ def __init__(self, api_user: _Optional[_Union[_api_user_pb2.APIUser, _Mapping]] = ...) -> None: ...
30
+
31
+ class ListApiUsersRequest(_message.Message):
32
+ __slots__ = ()
33
+ def __init__(self) -> None: ...
34
+
35
+ class ListApiUsersResponse(_message.Message):
36
+ __slots__ = ("api_users",)
37
+ API_USERS_FIELD_NUMBER: _ClassVar[int]
38
+ api_users: _containers.RepeatedCompositeFieldContainer[_api_user_pb2.APIUser]
39
+ def __init__(self, api_users: _Optional[_Iterable[_Union[_api_user_pb2.APIUser, _Mapping]]] = ...) -> None: ...
40
+
41
+ class SearchApiUsersRequest(_message.Message):
42
+ __slots__ = ("display_name",)
43
+ DISPLAY_NAME_FIELD_NUMBER: _ClassVar[int]
44
+ display_name: str
45
+ def __init__(self, display_name: _Optional[str] = ...) -> None: ...
46
+
47
+ class SearchApiUsersResponse(_message.Message):
48
+ __slots__ = ("api_users",)
49
+ API_USERS_FIELD_NUMBER: _ClassVar[int]
50
+ api_users: _containers.RepeatedCompositeFieldContainer[_api_user_pb2.APIUser]
51
+ def __init__(self, api_users: _Optional[_Iterable[_Union[_api_user_pb2.APIUser, _Mapping]]] = ...) -> None: ...
52
+
53
+ class ActivateApiUserRequest(_message.Message):
54
+ __slots__ = ("name",)
55
+ NAME_FIELD_NUMBER: _ClassVar[int]
56
+ name: str
57
+ def __init__(self, name: _Optional[str] = ...) -> None: ...
58
+
59
+ class DeactivateApiUserRequest(_message.Message):
60
+ __slots__ = ("name",)
61
+ NAME_FIELD_NUMBER: _ClassVar[int]
62
+ name: str
63
+ def __init__(self, name: _Optional[str] = ...) -> None: ...