otdf-python 0.1.10__py3-none-any.whl → 0.3.5__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.
Files changed (144) hide show
  1. otdf_python/__init__.py +25 -0
  2. otdf_python/__main__.py +12 -0
  3. otdf_python/address_normalizer.py +84 -0
  4. otdf_python/aesgcm.py +55 -0
  5. otdf_python/assertion_config.py +84 -0
  6. otdf_python/asym_crypto.py +198 -0
  7. otdf_python/auth_headers.py +33 -0
  8. otdf_python/autoconfigure_utils.py +113 -0
  9. otdf_python/cli.py +569 -0
  10. otdf_python/collection_store.py +41 -0
  11. otdf_python/collection_store_impl.py +22 -0
  12. otdf_python/config.py +69 -0
  13. otdf_python/connect_client.py +0 -0
  14. otdf_python/constants.py +1 -0
  15. otdf_python/crypto_utils.py +78 -0
  16. otdf_python/dpop.py +81 -0
  17. otdf_python/ecc_constants.py +176 -0
  18. otdf_python/ecc_mode.py +83 -0
  19. otdf_python/ecdh.py +317 -0
  20. otdf_python/eckeypair.py +75 -0
  21. otdf_python/header.py +181 -0
  22. otdf_python/invalid_zip_exception.py +8 -0
  23. otdf_python/kas_client.py +709 -0
  24. otdf_python/kas_connect_rpc_client.py +213 -0
  25. otdf_python/kas_info.py +25 -0
  26. otdf_python/kas_key_cache.py +52 -0
  27. otdf_python/key_type.py +31 -0
  28. otdf_python/key_type_constants.py +43 -0
  29. otdf_python/manifest.py +215 -0
  30. otdf_python/nanotdf.py +863 -0
  31. otdf_python/nanotdf_ecdsa_struct.py +132 -0
  32. otdf_python/nanotdf_type.py +43 -0
  33. otdf_python/policy_binding_serializer.py +39 -0
  34. otdf_python/policy_info.py +55 -0
  35. otdf_python/policy_object.py +22 -0
  36. otdf_python/policy_stub.py +2 -0
  37. otdf_python/resource_locator.py +172 -0
  38. otdf_python/sdk.py +436 -0
  39. otdf_python/sdk_builder.py +416 -0
  40. otdf_python/sdk_exceptions.py +16 -0
  41. otdf_python/symmetric_and_payload_config.py +30 -0
  42. otdf_python/tdf.py +480 -0
  43. otdf_python/tdf_reader.py +153 -0
  44. otdf_python/tdf_writer.py +23 -0
  45. otdf_python/token_source.py +34 -0
  46. otdf_python/version.py +57 -0
  47. otdf_python/zip_reader.py +47 -0
  48. otdf_python/zip_writer.py +70 -0
  49. otdf_python-0.3.5.dist-info/METADATA +153 -0
  50. otdf_python-0.3.5.dist-info/RECORD +137 -0
  51. {otdf_python-0.1.10.dist-info → otdf_python-0.3.5.dist-info}/WHEEL +1 -2
  52. {otdf_python-0.1.10.dist-info → otdf_python-0.3.5.dist-info/licenses}/LICENSE +1 -1
  53. otdf_python_proto/__init__.py +37 -0
  54. otdf_python_proto/authorization/__init__.py +1 -0
  55. otdf_python_proto/authorization/authorization_pb2.py +80 -0
  56. otdf_python_proto/authorization/authorization_pb2.pyi +161 -0
  57. otdf_python_proto/authorization/authorization_pb2_connect.py +191 -0
  58. otdf_python_proto/authorization/v2/authorization_pb2.py +105 -0
  59. otdf_python_proto/authorization/v2/authorization_pb2.pyi +134 -0
  60. otdf_python_proto/authorization/v2/authorization_pb2_connect.py +233 -0
  61. otdf_python_proto/common/__init__.py +1 -0
  62. otdf_python_proto/common/common_pb2.py +52 -0
  63. otdf_python_proto/common/common_pb2.pyi +61 -0
  64. otdf_python_proto/entity/__init__.py +1 -0
  65. otdf_python_proto/entity/entity_pb2.py +47 -0
  66. otdf_python_proto/entity/entity_pb2.pyi +50 -0
  67. otdf_python_proto/entityresolution/__init__.py +1 -0
  68. otdf_python_proto/entityresolution/entity_resolution_pb2.py +57 -0
  69. otdf_python_proto/entityresolution/entity_resolution_pb2.pyi +55 -0
  70. otdf_python_proto/entityresolution/entity_resolution_pb2_connect.py +149 -0
  71. otdf_python_proto/entityresolution/v2/entity_resolution_pb2.py +55 -0
  72. otdf_python_proto/entityresolution/v2/entity_resolution_pb2.pyi +55 -0
  73. otdf_python_proto/entityresolution/v2/entity_resolution_pb2_connect.py +149 -0
  74. otdf_python_proto/kas/__init__.py +9 -0
  75. otdf_python_proto/kas/kas_pb2.py +103 -0
  76. otdf_python_proto/kas/kas_pb2.pyi +170 -0
  77. otdf_python_proto/kas/kas_pb2_connect.py +192 -0
  78. otdf_python_proto/legacy_grpc/__init__.py +1 -0
  79. otdf_python_proto/legacy_grpc/authorization/authorization_pb2_grpc.py +163 -0
  80. otdf_python_proto/legacy_grpc/authorization/v2/authorization_pb2_grpc.py +206 -0
  81. otdf_python_proto/legacy_grpc/common/common_pb2_grpc.py +4 -0
  82. otdf_python_proto/legacy_grpc/entity/entity_pb2_grpc.py +4 -0
  83. otdf_python_proto/legacy_grpc/entityresolution/entity_resolution_pb2_grpc.py +122 -0
  84. otdf_python_proto/legacy_grpc/entityresolution/v2/entity_resolution_pb2_grpc.py +120 -0
  85. otdf_python_proto/legacy_grpc/kas/kas_pb2_grpc.py +172 -0
  86. otdf_python_proto/legacy_grpc/logger/audit/test_pb2_grpc.py +4 -0
  87. otdf_python_proto/legacy_grpc/policy/actions/actions_pb2_grpc.py +249 -0
  88. otdf_python_proto/legacy_grpc/policy/attributes/attributes_pb2_grpc.py +873 -0
  89. otdf_python_proto/legacy_grpc/policy/kasregistry/key_access_server_registry_pb2_grpc.py +602 -0
  90. otdf_python_proto/legacy_grpc/policy/keymanagement/key_management_pb2_grpc.py +251 -0
  91. otdf_python_proto/legacy_grpc/policy/namespaces/namespaces_pb2_grpc.py +427 -0
  92. otdf_python_proto/legacy_grpc/policy/objects_pb2_grpc.py +4 -0
  93. otdf_python_proto/legacy_grpc/policy/registeredresources/registered_resources_pb2_grpc.py +524 -0
  94. otdf_python_proto/legacy_grpc/policy/resourcemapping/resource_mapping_pb2_grpc.py +516 -0
  95. otdf_python_proto/legacy_grpc/policy/selectors_pb2_grpc.py +4 -0
  96. otdf_python_proto/legacy_grpc/policy/subjectmapping/subject_mapping_pb2_grpc.py +551 -0
  97. otdf_python_proto/legacy_grpc/policy/unsafe/unsafe_pb2_grpc.py +485 -0
  98. otdf_python_proto/legacy_grpc/wellknownconfiguration/wellknown_configuration_pb2_grpc.py +77 -0
  99. otdf_python_proto/logger/__init__.py +1 -0
  100. otdf_python_proto/logger/audit/test_pb2.py +43 -0
  101. otdf_python_proto/logger/audit/test_pb2.pyi +45 -0
  102. otdf_python_proto/policy/__init__.py +1 -0
  103. otdf_python_proto/policy/actions/actions_pb2.py +75 -0
  104. otdf_python_proto/policy/actions/actions_pb2.pyi +87 -0
  105. otdf_python_proto/policy/actions/actions_pb2_connect.py +275 -0
  106. otdf_python_proto/policy/attributes/attributes_pb2.py +234 -0
  107. otdf_python_proto/policy/attributes/attributes_pb2.pyi +328 -0
  108. otdf_python_proto/policy/attributes/attributes_pb2_connect.py +863 -0
  109. otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.py +266 -0
  110. otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.pyi +450 -0
  111. otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2_connect.py +611 -0
  112. otdf_python_proto/policy/keymanagement/key_management_pb2.py +79 -0
  113. otdf_python_proto/policy/keymanagement/key_management_pb2.pyi +87 -0
  114. otdf_python_proto/policy/keymanagement/key_management_pb2_connect.py +275 -0
  115. otdf_python_proto/policy/namespaces/namespaces_pb2.py +117 -0
  116. otdf_python_proto/policy/namespaces/namespaces_pb2.pyi +147 -0
  117. otdf_python_proto/policy/namespaces/namespaces_pb2_connect.py +443 -0
  118. otdf_python_proto/policy/objects_pb2.py +150 -0
  119. otdf_python_proto/policy/objects_pb2.pyi +464 -0
  120. otdf_python_proto/policy/registeredresources/registered_resources_pb2.py +139 -0
  121. otdf_python_proto/policy/registeredresources/registered_resources_pb2.pyi +196 -0
  122. otdf_python_proto/policy/registeredresources/registered_resources_pb2_connect.py +527 -0
  123. otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.py +139 -0
  124. otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.pyi +194 -0
  125. otdf_python_proto/policy/resourcemapping/resource_mapping_pb2_connect.py +527 -0
  126. otdf_python_proto/policy/selectors_pb2.py +57 -0
  127. otdf_python_proto/policy/selectors_pb2.pyi +90 -0
  128. otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.py +127 -0
  129. otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.pyi +189 -0
  130. otdf_python_proto/policy/subjectmapping/subject_mapping_pb2_connect.py +569 -0
  131. otdf_python_proto/policy/unsafe/unsafe_pb2.py +113 -0
  132. otdf_python_proto/policy/unsafe/unsafe_pb2.pyi +145 -0
  133. otdf_python_proto/policy/unsafe/unsafe_pb2_connect.py +485 -0
  134. otdf_python_proto/wellknownconfiguration/__init__.py +1 -0
  135. otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.py +51 -0
  136. otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.pyi +32 -0
  137. otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2_connect.py +107 -0
  138. otdf_python/_gotdf_python.cpython-312-darwin.so +0 -0
  139. otdf_python/build.py +0 -190
  140. otdf_python/go.py +0 -1478
  141. otdf_python/gotdf_python.py +0 -383
  142. otdf_python-0.1.10.dist-info/METADATA +0 -149
  143. otdf_python-0.1.10.dist-info/RECORD +0 -10
  144. otdf_python-0.1.10.dist-info/top_level.txt +0 -1
@@ -0,0 +1,249 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from policy.actions import actions_pb2 as policy_dot_actions_dot_actions__pb2
6
+
7
+
8
+ class ActionServiceStub(object):
9
+ """Missing associated documentation comment in .proto file."""
10
+
11
+ def __init__(self, channel):
12
+ """Constructor.
13
+
14
+ Args:
15
+ channel: A grpc.Channel.
16
+ """
17
+ self.GetAction = channel.unary_unary(
18
+ '/policy.actions.ActionService/GetAction',
19
+ request_serializer=policy_dot_actions_dot_actions__pb2.GetActionRequest.SerializeToString,
20
+ response_deserializer=policy_dot_actions_dot_actions__pb2.GetActionResponse.FromString,
21
+ _registered_method=True)
22
+ self.ListActions = channel.unary_unary(
23
+ '/policy.actions.ActionService/ListActions',
24
+ request_serializer=policy_dot_actions_dot_actions__pb2.ListActionsRequest.SerializeToString,
25
+ response_deserializer=policy_dot_actions_dot_actions__pb2.ListActionsResponse.FromString,
26
+ _registered_method=True)
27
+ self.CreateAction = channel.unary_unary(
28
+ '/policy.actions.ActionService/CreateAction',
29
+ request_serializer=policy_dot_actions_dot_actions__pb2.CreateActionRequest.SerializeToString,
30
+ response_deserializer=policy_dot_actions_dot_actions__pb2.CreateActionResponse.FromString,
31
+ _registered_method=True)
32
+ self.UpdateAction = channel.unary_unary(
33
+ '/policy.actions.ActionService/UpdateAction',
34
+ request_serializer=policy_dot_actions_dot_actions__pb2.UpdateActionRequest.SerializeToString,
35
+ response_deserializer=policy_dot_actions_dot_actions__pb2.UpdateActionResponse.FromString,
36
+ _registered_method=True)
37
+ self.DeleteAction = channel.unary_unary(
38
+ '/policy.actions.ActionService/DeleteAction',
39
+ request_serializer=policy_dot_actions_dot_actions__pb2.DeleteActionRequest.SerializeToString,
40
+ response_deserializer=policy_dot_actions_dot_actions__pb2.DeleteActionResponse.FromString,
41
+ _registered_method=True)
42
+
43
+
44
+ class ActionServiceServicer(object):
45
+ """Missing associated documentation comment in .proto file."""
46
+
47
+ def GetAction(self, request, context):
48
+ """Missing associated documentation comment in .proto file."""
49
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
50
+ context.set_details('Method not implemented!')
51
+ raise NotImplementedError('Method not implemented!')
52
+
53
+ def ListActions(self, request, context):
54
+ """Missing associated documentation comment in .proto file."""
55
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
56
+ context.set_details('Method not implemented!')
57
+ raise NotImplementedError('Method not implemented!')
58
+
59
+ def CreateAction(self, request, context):
60
+ """Missing associated documentation comment in .proto file."""
61
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
62
+ context.set_details('Method not implemented!')
63
+ raise NotImplementedError('Method not implemented!')
64
+
65
+ def UpdateAction(self, request, context):
66
+ """Missing associated documentation comment in .proto file."""
67
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
68
+ context.set_details('Method not implemented!')
69
+ raise NotImplementedError('Method not implemented!')
70
+
71
+ def DeleteAction(self, request, context):
72
+ """Missing associated documentation comment in .proto file."""
73
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
74
+ context.set_details('Method not implemented!')
75
+ raise NotImplementedError('Method not implemented!')
76
+
77
+
78
+ def add_ActionServiceServicer_to_server(servicer, server):
79
+ rpc_method_handlers = {
80
+ 'GetAction': grpc.unary_unary_rpc_method_handler(
81
+ servicer.GetAction,
82
+ request_deserializer=policy_dot_actions_dot_actions__pb2.GetActionRequest.FromString,
83
+ response_serializer=policy_dot_actions_dot_actions__pb2.GetActionResponse.SerializeToString,
84
+ ),
85
+ 'ListActions': grpc.unary_unary_rpc_method_handler(
86
+ servicer.ListActions,
87
+ request_deserializer=policy_dot_actions_dot_actions__pb2.ListActionsRequest.FromString,
88
+ response_serializer=policy_dot_actions_dot_actions__pb2.ListActionsResponse.SerializeToString,
89
+ ),
90
+ 'CreateAction': grpc.unary_unary_rpc_method_handler(
91
+ servicer.CreateAction,
92
+ request_deserializer=policy_dot_actions_dot_actions__pb2.CreateActionRequest.FromString,
93
+ response_serializer=policy_dot_actions_dot_actions__pb2.CreateActionResponse.SerializeToString,
94
+ ),
95
+ 'UpdateAction': grpc.unary_unary_rpc_method_handler(
96
+ servicer.UpdateAction,
97
+ request_deserializer=policy_dot_actions_dot_actions__pb2.UpdateActionRequest.FromString,
98
+ response_serializer=policy_dot_actions_dot_actions__pb2.UpdateActionResponse.SerializeToString,
99
+ ),
100
+ 'DeleteAction': grpc.unary_unary_rpc_method_handler(
101
+ servicer.DeleteAction,
102
+ request_deserializer=policy_dot_actions_dot_actions__pb2.DeleteActionRequest.FromString,
103
+ response_serializer=policy_dot_actions_dot_actions__pb2.DeleteActionResponse.SerializeToString,
104
+ ),
105
+ }
106
+ generic_handler = grpc.method_handlers_generic_handler(
107
+ 'policy.actions.ActionService', rpc_method_handlers)
108
+ server.add_generic_rpc_handlers((generic_handler,))
109
+ server.add_registered_method_handlers('policy.actions.ActionService', rpc_method_handlers)
110
+
111
+
112
+ # This class is part of an EXPERIMENTAL API.
113
+ class ActionService(object):
114
+ """Missing associated documentation comment in .proto file."""
115
+
116
+ @staticmethod
117
+ def GetAction(request,
118
+ target,
119
+ options=(),
120
+ channel_credentials=None,
121
+ call_credentials=None,
122
+ insecure=False,
123
+ compression=None,
124
+ wait_for_ready=None,
125
+ timeout=None,
126
+ metadata=None):
127
+ return grpc.experimental.unary_unary(
128
+ request,
129
+ target,
130
+ '/policy.actions.ActionService/GetAction',
131
+ policy_dot_actions_dot_actions__pb2.GetActionRequest.SerializeToString,
132
+ policy_dot_actions_dot_actions__pb2.GetActionResponse.FromString,
133
+ options,
134
+ channel_credentials,
135
+ insecure,
136
+ call_credentials,
137
+ compression,
138
+ wait_for_ready,
139
+ timeout,
140
+ metadata,
141
+ _registered_method=True)
142
+
143
+ @staticmethod
144
+ def ListActions(request,
145
+ target,
146
+ options=(),
147
+ channel_credentials=None,
148
+ call_credentials=None,
149
+ insecure=False,
150
+ compression=None,
151
+ wait_for_ready=None,
152
+ timeout=None,
153
+ metadata=None):
154
+ return grpc.experimental.unary_unary(
155
+ request,
156
+ target,
157
+ '/policy.actions.ActionService/ListActions',
158
+ policy_dot_actions_dot_actions__pb2.ListActionsRequest.SerializeToString,
159
+ policy_dot_actions_dot_actions__pb2.ListActionsResponse.FromString,
160
+ options,
161
+ channel_credentials,
162
+ insecure,
163
+ call_credentials,
164
+ compression,
165
+ wait_for_ready,
166
+ timeout,
167
+ metadata,
168
+ _registered_method=True)
169
+
170
+ @staticmethod
171
+ def CreateAction(request,
172
+ target,
173
+ options=(),
174
+ channel_credentials=None,
175
+ call_credentials=None,
176
+ insecure=False,
177
+ compression=None,
178
+ wait_for_ready=None,
179
+ timeout=None,
180
+ metadata=None):
181
+ return grpc.experimental.unary_unary(
182
+ request,
183
+ target,
184
+ '/policy.actions.ActionService/CreateAction',
185
+ policy_dot_actions_dot_actions__pb2.CreateActionRequest.SerializeToString,
186
+ policy_dot_actions_dot_actions__pb2.CreateActionResponse.FromString,
187
+ options,
188
+ channel_credentials,
189
+ insecure,
190
+ call_credentials,
191
+ compression,
192
+ wait_for_ready,
193
+ timeout,
194
+ metadata,
195
+ _registered_method=True)
196
+
197
+ @staticmethod
198
+ def UpdateAction(request,
199
+ target,
200
+ options=(),
201
+ channel_credentials=None,
202
+ call_credentials=None,
203
+ insecure=False,
204
+ compression=None,
205
+ wait_for_ready=None,
206
+ timeout=None,
207
+ metadata=None):
208
+ return grpc.experimental.unary_unary(
209
+ request,
210
+ target,
211
+ '/policy.actions.ActionService/UpdateAction',
212
+ policy_dot_actions_dot_actions__pb2.UpdateActionRequest.SerializeToString,
213
+ policy_dot_actions_dot_actions__pb2.UpdateActionResponse.FromString,
214
+ options,
215
+ channel_credentials,
216
+ insecure,
217
+ call_credentials,
218
+ compression,
219
+ wait_for_ready,
220
+ timeout,
221
+ metadata,
222
+ _registered_method=True)
223
+
224
+ @staticmethod
225
+ def DeleteAction(request,
226
+ target,
227
+ options=(),
228
+ channel_credentials=None,
229
+ call_credentials=None,
230
+ insecure=False,
231
+ compression=None,
232
+ wait_for_ready=None,
233
+ timeout=None,
234
+ metadata=None):
235
+ return grpc.experimental.unary_unary(
236
+ request,
237
+ target,
238
+ '/policy.actions.ActionService/DeleteAction',
239
+ policy_dot_actions_dot_actions__pb2.DeleteActionRequest.SerializeToString,
240
+ policy_dot_actions_dot_actions__pb2.DeleteActionResponse.FromString,
241
+ options,
242
+ channel_credentials,
243
+ insecure,
244
+ call_credentials,
245
+ compression,
246
+ wait_for_ready,
247
+ timeout,
248
+ metadata,
249
+ _registered_method=True)