nucliadb-protos 6.3.7.post4116__py3-none-any.whl → 6.3.7.post4120__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.
@@ -1,579 +0,0 @@
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
- import warnings
5
-
6
- from nucliadb_protos import nodereader_pb2 as nucliadb__protos_dot_nodereader__pb2
7
- from nucliadb_protos import noderesources_pb2 as nucliadb__protos_dot_noderesources__pb2
8
-
9
- GRPC_GENERATED_VERSION = '1.71.0'
10
- GRPC_VERSION = grpc.__version__
11
- _version_not_supported = False
12
-
13
- try:
14
- from grpc._utilities import first_version_is_lower
15
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16
- except ImportError:
17
- _version_not_supported = True
18
-
19
- if _version_not_supported:
20
- raise RuntimeError(
21
- f'The grpc package installed is at version {GRPC_VERSION},'
22
- + f' but the generated code in nucliadb_protos/nodereader_pb2_grpc.py depends on'
23
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
24
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26
- )
27
-
28
-
29
- class NodeReaderStub(object):
30
- """Implemented at nucliadb_object_storage
31
-
32
- """
33
-
34
- def __init__(self, channel):
35
- """Constructor.
36
-
37
- Args:
38
- channel: A grpc.Channel.
39
- """
40
- self.GetShard = channel.unary_unary(
41
- '/nodereader.NodeReader/GetShard',
42
- request_serializer=nucliadb__protos_dot_nodereader__pb2.GetShardRequest.SerializeToString,
43
- response_deserializer=nucliadb__protos_dot_noderesources__pb2.Shard.FromString,
44
- _registered_method=True)
45
- self.DocumentIds = channel.unary_unary(
46
- '/nodereader.NodeReader/DocumentIds',
47
- request_serializer=nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
48
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
49
- _registered_method=True)
50
- self.ParagraphIds = channel.unary_unary(
51
- '/nodereader.NodeReader/ParagraphIds',
52
- request_serializer=nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
53
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
54
- _registered_method=True)
55
- self.VectorIds = channel.unary_unary(
56
- '/nodereader.NodeReader/VectorIds',
57
- request_serializer=nucliadb__protos_dot_noderesources__pb2.VectorSetID.SerializeToString,
58
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
59
- _registered_method=True)
60
- self.RelationIds = channel.unary_unary(
61
- '/nodereader.NodeReader/RelationIds',
62
- request_serializer=nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
63
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
64
- _registered_method=True)
65
- self.RelationEdges = channel.unary_unary(
66
- '/nodereader.NodeReader/RelationEdges',
67
- request_serializer=nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
68
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.EdgeList.FromString,
69
- _registered_method=True)
70
- self.Search = channel.unary_unary(
71
- '/nodereader.NodeReader/Search',
72
- request_serializer=nucliadb__protos_dot_nodereader__pb2.SearchRequest.SerializeToString,
73
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.SearchResponse.FromString,
74
- _registered_method=True)
75
- self.Suggest = channel.unary_unary(
76
- '/nodereader.NodeReader/Suggest',
77
- request_serializer=nucliadb__protos_dot_nodereader__pb2.SuggestRequest.SerializeToString,
78
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.SuggestResponse.FromString,
79
- _registered_method=True)
80
- self.Paragraphs = channel.unary_stream(
81
- '/nodereader.NodeReader/Paragraphs',
82
- request_serializer=nucliadb__protos_dot_nodereader__pb2.StreamRequest.SerializeToString,
83
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.ParagraphItem.FromString,
84
- _registered_method=True)
85
- self.Documents = channel.unary_stream(
86
- '/nodereader.NodeReader/Documents',
87
- request_serializer=nucliadb__protos_dot_nodereader__pb2.StreamRequest.SerializeToString,
88
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.DocumentItem.FromString,
89
- _registered_method=True)
90
- self.GetShardFiles = channel.unary_unary(
91
- '/nodereader.NodeReader/GetShardFiles',
92
- request_serializer=nucliadb__protos_dot_nodereader__pb2.GetShardFilesRequest.SerializeToString,
93
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.ShardFileList.FromString,
94
- _registered_method=True)
95
- self.DownloadShardFile = channel.unary_stream(
96
- '/nodereader.NodeReader/DownloadShardFile',
97
- request_serializer=nucliadb__protos_dot_nodereader__pb2.DownloadShardFileRequest.SerializeToString,
98
- response_deserializer=nucliadb__protos_dot_nodereader__pb2.ShardFileChunk.FromString,
99
- _registered_method=True)
100
-
101
-
102
- class NodeReaderServicer(object):
103
- """Implemented at nucliadb_object_storage
104
-
105
- """
106
-
107
- def GetShard(self, request, context):
108
- """Missing associated documentation comment in .proto file."""
109
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
110
- context.set_details('Method not implemented!')
111
- raise NotImplementedError('Method not implemented!')
112
-
113
- def DocumentIds(self, request, context):
114
- """Missing associated documentation comment in .proto file."""
115
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
116
- context.set_details('Method not implemented!')
117
- raise NotImplementedError('Method not implemented!')
118
-
119
- def ParagraphIds(self, request, context):
120
- """Missing associated documentation comment in .proto file."""
121
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
122
- context.set_details('Method not implemented!')
123
- raise NotImplementedError('Method not implemented!')
124
-
125
- def VectorIds(self, request, context):
126
- """Missing associated documentation comment in .proto file."""
127
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
128
- context.set_details('Method not implemented!')
129
- raise NotImplementedError('Method not implemented!')
130
-
131
- def RelationIds(self, request, context):
132
- """Missing associated documentation comment in .proto file."""
133
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
134
- context.set_details('Method not implemented!')
135
- raise NotImplementedError('Method not implemented!')
136
-
137
- def RelationEdges(self, request, context):
138
- """Missing associated documentation comment in .proto file."""
139
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
140
- context.set_details('Method not implemented!')
141
- raise NotImplementedError('Method not implemented!')
142
-
143
- def Search(self, request, context):
144
- """Missing associated documentation comment in .proto file."""
145
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
146
- context.set_details('Method not implemented!')
147
- raise NotImplementedError('Method not implemented!')
148
-
149
- def Suggest(self, request, context):
150
- """Missing associated documentation comment in .proto file."""
151
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
152
- context.set_details('Method not implemented!')
153
- raise NotImplementedError('Method not implemented!')
154
-
155
- def Paragraphs(self, request, context):
156
- """Streams
157
- """
158
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
159
- context.set_details('Method not implemented!')
160
- raise NotImplementedError('Method not implemented!')
161
-
162
- def Documents(self, request, context):
163
- """Missing associated documentation comment in .proto file."""
164
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
165
- context.set_details('Method not implemented!')
166
- raise NotImplementedError('Method not implemented!')
167
-
168
- def GetShardFiles(self, request, context):
169
- """Shard Download
170
- """
171
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
172
- context.set_details('Method not implemented!')
173
- raise NotImplementedError('Method not implemented!')
174
-
175
- def DownloadShardFile(self, request, context):
176
- """Missing associated documentation comment in .proto file."""
177
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
178
- context.set_details('Method not implemented!')
179
- raise NotImplementedError('Method not implemented!')
180
-
181
-
182
- def add_NodeReaderServicer_to_server(servicer, server):
183
- rpc_method_handlers = {
184
- 'GetShard': grpc.unary_unary_rpc_method_handler(
185
- servicer.GetShard,
186
- request_deserializer=nucliadb__protos_dot_nodereader__pb2.GetShardRequest.FromString,
187
- response_serializer=nucliadb__protos_dot_noderesources__pb2.Shard.SerializeToString,
188
- ),
189
- 'DocumentIds': grpc.unary_unary_rpc_method_handler(
190
- servicer.DocumentIds,
191
- request_deserializer=nucliadb__protos_dot_noderesources__pb2.ShardId.FromString,
192
- response_serializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.SerializeToString,
193
- ),
194
- 'ParagraphIds': grpc.unary_unary_rpc_method_handler(
195
- servicer.ParagraphIds,
196
- request_deserializer=nucliadb__protos_dot_noderesources__pb2.ShardId.FromString,
197
- response_serializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.SerializeToString,
198
- ),
199
- 'VectorIds': grpc.unary_unary_rpc_method_handler(
200
- servicer.VectorIds,
201
- request_deserializer=nucliadb__protos_dot_noderesources__pb2.VectorSetID.FromString,
202
- response_serializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.SerializeToString,
203
- ),
204
- 'RelationIds': grpc.unary_unary_rpc_method_handler(
205
- servicer.RelationIds,
206
- request_deserializer=nucliadb__protos_dot_noderesources__pb2.ShardId.FromString,
207
- response_serializer=nucliadb__protos_dot_nodereader__pb2.IdCollection.SerializeToString,
208
- ),
209
- 'RelationEdges': grpc.unary_unary_rpc_method_handler(
210
- servicer.RelationEdges,
211
- request_deserializer=nucliadb__protos_dot_noderesources__pb2.ShardId.FromString,
212
- response_serializer=nucliadb__protos_dot_nodereader__pb2.EdgeList.SerializeToString,
213
- ),
214
- 'Search': grpc.unary_unary_rpc_method_handler(
215
- servicer.Search,
216
- request_deserializer=nucliadb__protos_dot_nodereader__pb2.SearchRequest.FromString,
217
- response_serializer=nucliadb__protos_dot_nodereader__pb2.SearchResponse.SerializeToString,
218
- ),
219
- 'Suggest': grpc.unary_unary_rpc_method_handler(
220
- servicer.Suggest,
221
- request_deserializer=nucliadb__protos_dot_nodereader__pb2.SuggestRequest.FromString,
222
- response_serializer=nucliadb__protos_dot_nodereader__pb2.SuggestResponse.SerializeToString,
223
- ),
224
- 'Paragraphs': grpc.unary_stream_rpc_method_handler(
225
- servicer.Paragraphs,
226
- request_deserializer=nucliadb__protos_dot_nodereader__pb2.StreamRequest.FromString,
227
- response_serializer=nucliadb__protos_dot_nodereader__pb2.ParagraphItem.SerializeToString,
228
- ),
229
- 'Documents': grpc.unary_stream_rpc_method_handler(
230
- servicer.Documents,
231
- request_deserializer=nucliadb__protos_dot_nodereader__pb2.StreamRequest.FromString,
232
- response_serializer=nucliadb__protos_dot_nodereader__pb2.DocumentItem.SerializeToString,
233
- ),
234
- 'GetShardFiles': grpc.unary_unary_rpc_method_handler(
235
- servicer.GetShardFiles,
236
- request_deserializer=nucliadb__protos_dot_nodereader__pb2.GetShardFilesRequest.FromString,
237
- response_serializer=nucliadb__protos_dot_nodereader__pb2.ShardFileList.SerializeToString,
238
- ),
239
- 'DownloadShardFile': grpc.unary_stream_rpc_method_handler(
240
- servicer.DownloadShardFile,
241
- request_deserializer=nucliadb__protos_dot_nodereader__pb2.DownloadShardFileRequest.FromString,
242
- response_serializer=nucliadb__protos_dot_nodereader__pb2.ShardFileChunk.SerializeToString,
243
- ),
244
- }
245
- generic_handler = grpc.method_handlers_generic_handler(
246
- 'nodereader.NodeReader', rpc_method_handlers)
247
- server.add_generic_rpc_handlers((generic_handler,))
248
- server.add_registered_method_handlers('nodereader.NodeReader', rpc_method_handlers)
249
-
250
-
251
- # This class is part of an EXPERIMENTAL API.
252
- class NodeReader(object):
253
- """Implemented at nucliadb_object_storage
254
-
255
- """
256
-
257
- @staticmethod
258
- def GetShard(request,
259
- target,
260
- options=(),
261
- channel_credentials=None,
262
- call_credentials=None,
263
- insecure=False,
264
- compression=None,
265
- wait_for_ready=None,
266
- timeout=None,
267
- metadata=None):
268
- return grpc.experimental.unary_unary(
269
- request,
270
- target,
271
- '/nodereader.NodeReader/GetShard',
272
- nucliadb__protos_dot_nodereader__pb2.GetShardRequest.SerializeToString,
273
- nucliadb__protos_dot_noderesources__pb2.Shard.FromString,
274
- options,
275
- channel_credentials,
276
- insecure,
277
- call_credentials,
278
- compression,
279
- wait_for_ready,
280
- timeout,
281
- metadata,
282
- _registered_method=True)
283
-
284
- @staticmethod
285
- def DocumentIds(request,
286
- target,
287
- options=(),
288
- channel_credentials=None,
289
- call_credentials=None,
290
- insecure=False,
291
- compression=None,
292
- wait_for_ready=None,
293
- timeout=None,
294
- metadata=None):
295
- return grpc.experimental.unary_unary(
296
- request,
297
- target,
298
- '/nodereader.NodeReader/DocumentIds',
299
- nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
300
- nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
301
- options,
302
- channel_credentials,
303
- insecure,
304
- call_credentials,
305
- compression,
306
- wait_for_ready,
307
- timeout,
308
- metadata,
309
- _registered_method=True)
310
-
311
- @staticmethod
312
- def ParagraphIds(request,
313
- target,
314
- options=(),
315
- channel_credentials=None,
316
- call_credentials=None,
317
- insecure=False,
318
- compression=None,
319
- wait_for_ready=None,
320
- timeout=None,
321
- metadata=None):
322
- return grpc.experimental.unary_unary(
323
- request,
324
- target,
325
- '/nodereader.NodeReader/ParagraphIds',
326
- nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
327
- nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
328
- options,
329
- channel_credentials,
330
- insecure,
331
- call_credentials,
332
- compression,
333
- wait_for_ready,
334
- timeout,
335
- metadata,
336
- _registered_method=True)
337
-
338
- @staticmethod
339
- def VectorIds(request,
340
- target,
341
- options=(),
342
- channel_credentials=None,
343
- call_credentials=None,
344
- insecure=False,
345
- compression=None,
346
- wait_for_ready=None,
347
- timeout=None,
348
- metadata=None):
349
- return grpc.experimental.unary_unary(
350
- request,
351
- target,
352
- '/nodereader.NodeReader/VectorIds',
353
- nucliadb__protos_dot_noderesources__pb2.VectorSetID.SerializeToString,
354
- nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
355
- options,
356
- channel_credentials,
357
- insecure,
358
- call_credentials,
359
- compression,
360
- wait_for_ready,
361
- timeout,
362
- metadata,
363
- _registered_method=True)
364
-
365
- @staticmethod
366
- def RelationIds(request,
367
- target,
368
- options=(),
369
- channel_credentials=None,
370
- call_credentials=None,
371
- insecure=False,
372
- compression=None,
373
- wait_for_ready=None,
374
- timeout=None,
375
- metadata=None):
376
- return grpc.experimental.unary_unary(
377
- request,
378
- target,
379
- '/nodereader.NodeReader/RelationIds',
380
- nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
381
- nucliadb__protos_dot_nodereader__pb2.IdCollection.FromString,
382
- options,
383
- channel_credentials,
384
- insecure,
385
- call_credentials,
386
- compression,
387
- wait_for_ready,
388
- timeout,
389
- metadata,
390
- _registered_method=True)
391
-
392
- @staticmethod
393
- def RelationEdges(request,
394
- target,
395
- options=(),
396
- channel_credentials=None,
397
- call_credentials=None,
398
- insecure=False,
399
- compression=None,
400
- wait_for_ready=None,
401
- timeout=None,
402
- metadata=None):
403
- return grpc.experimental.unary_unary(
404
- request,
405
- target,
406
- '/nodereader.NodeReader/RelationEdges',
407
- nucliadb__protos_dot_noderesources__pb2.ShardId.SerializeToString,
408
- nucliadb__protos_dot_nodereader__pb2.EdgeList.FromString,
409
- options,
410
- channel_credentials,
411
- insecure,
412
- call_credentials,
413
- compression,
414
- wait_for_ready,
415
- timeout,
416
- metadata,
417
- _registered_method=True)
418
-
419
- @staticmethod
420
- def Search(request,
421
- target,
422
- options=(),
423
- channel_credentials=None,
424
- call_credentials=None,
425
- insecure=False,
426
- compression=None,
427
- wait_for_ready=None,
428
- timeout=None,
429
- metadata=None):
430
- return grpc.experimental.unary_unary(
431
- request,
432
- target,
433
- '/nodereader.NodeReader/Search',
434
- nucliadb__protos_dot_nodereader__pb2.SearchRequest.SerializeToString,
435
- nucliadb__protos_dot_nodereader__pb2.SearchResponse.FromString,
436
- options,
437
- channel_credentials,
438
- insecure,
439
- call_credentials,
440
- compression,
441
- wait_for_ready,
442
- timeout,
443
- metadata,
444
- _registered_method=True)
445
-
446
- @staticmethod
447
- def Suggest(request,
448
- target,
449
- options=(),
450
- channel_credentials=None,
451
- call_credentials=None,
452
- insecure=False,
453
- compression=None,
454
- wait_for_ready=None,
455
- timeout=None,
456
- metadata=None):
457
- return grpc.experimental.unary_unary(
458
- request,
459
- target,
460
- '/nodereader.NodeReader/Suggest',
461
- nucliadb__protos_dot_nodereader__pb2.SuggestRequest.SerializeToString,
462
- nucliadb__protos_dot_nodereader__pb2.SuggestResponse.FromString,
463
- options,
464
- channel_credentials,
465
- insecure,
466
- call_credentials,
467
- compression,
468
- wait_for_ready,
469
- timeout,
470
- metadata,
471
- _registered_method=True)
472
-
473
- @staticmethod
474
- def Paragraphs(request,
475
- target,
476
- options=(),
477
- channel_credentials=None,
478
- call_credentials=None,
479
- insecure=False,
480
- compression=None,
481
- wait_for_ready=None,
482
- timeout=None,
483
- metadata=None):
484
- return grpc.experimental.unary_stream(
485
- request,
486
- target,
487
- '/nodereader.NodeReader/Paragraphs',
488
- nucliadb__protos_dot_nodereader__pb2.StreamRequest.SerializeToString,
489
- nucliadb__protos_dot_nodereader__pb2.ParagraphItem.FromString,
490
- options,
491
- channel_credentials,
492
- insecure,
493
- call_credentials,
494
- compression,
495
- wait_for_ready,
496
- timeout,
497
- metadata,
498
- _registered_method=True)
499
-
500
- @staticmethod
501
- def Documents(request,
502
- target,
503
- options=(),
504
- channel_credentials=None,
505
- call_credentials=None,
506
- insecure=False,
507
- compression=None,
508
- wait_for_ready=None,
509
- timeout=None,
510
- metadata=None):
511
- return grpc.experimental.unary_stream(
512
- request,
513
- target,
514
- '/nodereader.NodeReader/Documents',
515
- nucliadb__protos_dot_nodereader__pb2.StreamRequest.SerializeToString,
516
- nucliadb__protos_dot_nodereader__pb2.DocumentItem.FromString,
517
- options,
518
- channel_credentials,
519
- insecure,
520
- call_credentials,
521
- compression,
522
- wait_for_ready,
523
- timeout,
524
- metadata,
525
- _registered_method=True)
526
-
527
- @staticmethod
528
- def GetShardFiles(request,
529
- target,
530
- options=(),
531
- channel_credentials=None,
532
- call_credentials=None,
533
- insecure=False,
534
- compression=None,
535
- wait_for_ready=None,
536
- timeout=None,
537
- metadata=None):
538
- return grpc.experimental.unary_unary(
539
- request,
540
- target,
541
- '/nodereader.NodeReader/GetShardFiles',
542
- nucliadb__protos_dot_nodereader__pb2.GetShardFilesRequest.SerializeToString,
543
- nucliadb__protos_dot_nodereader__pb2.ShardFileList.FromString,
544
- options,
545
- channel_credentials,
546
- insecure,
547
- call_credentials,
548
- compression,
549
- wait_for_ready,
550
- timeout,
551
- metadata,
552
- _registered_method=True)
553
-
554
- @staticmethod
555
- def DownloadShardFile(request,
556
- target,
557
- options=(),
558
- channel_credentials=None,
559
- call_credentials=None,
560
- insecure=False,
561
- compression=None,
562
- wait_for_ready=None,
563
- timeout=None,
564
- metadata=None):
565
- return grpc.experimental.unary_stream(
566
- request,
567
- target,
568
- '/nodereader.NodeReader/DownloadShardFile',
569
- nucliadb__protos_dot_nodereader__pb2.DownloadShardFileRequest.SerializeToString,
570
- nucliadb__protos_dot_nodereader__pb2.ShardFileChunk.FromString,
571
- options,
572
- channel_credentials,
573
- insecure,
574
- call_credentials,
575
- compression,
576
- wait_for_ready,
577
- timeout,
578
- metadata,
579
- _registered_method=True)