grpcio-fips 1.70.0__1-cp310-cp310-win_amd64.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 (66) hide show
  1. grpc/__init__.py +2348 -0
  2. grpc/_auth.py +80 -0
  3. grpc/_channel.py +2267 -0
  4. grpc/_common.py +183 -0
  5. grpc/_compression.py +71 -0
  6. grpc/_cython/__init__.py +13 -0
  7. grpc/_cython/_credentials/roots.pem +4337 -0
  8. grpc/_cython/_cygrpc/__init__.py +13 -0
  9. grpc/_cython/ayx-crypto-library.dll +0 -0
  10. grpc/_cython/cygrpc.cp310-win_amd64.pyd +0 -0
  11. grpc/_cython/libcrypto-3-x64.dll +0 -0
  12. grpc/_cython/libssl-3-x64.dll +0 -0
  13. grpc/_grpcio_metadata.py +1 -0
  14. grpc/_interceptor.py +813 -0
  15. grpc/_observability.py +299 -0
  16. grpc/_plugin_wrapping.py +136 -0
  17. grpc/_runtime_protos.py +165 -0
  18. grpc/_server.py +1528 -0
  19. grpc/_simple_stubs.py +588 -0
  20. grpc/_typing.py +95 -0
  21. grpc/_utilities.py +222 -0
  22. grpc/aio/__init__.py +95 -0
  23. grpc/aio/_base_call.py +257 -0
  24. grpc/aio/_base_channel.py +364 -0
  25. grpc/aio/_base_server.py +385 -0
  26. grpc/aio/_call.py +764 -0
  27. grpc/aio/_channel.py +627 -0
  28. grpc/aio/_interceptor.py +1178 -0
  29. grpc/aio/_metadata.py +137 -0
  30. grpc/aio/_server.py +239 -0
  31. grpc/aio/_typing.py +43 -0
  32. grpc/aio/_utils.py +22 -0
  33. grpc/beta/__init__.py +13 -0
  34. grpc/beta/_client_adaptations.py +1015 -0
  35. grpc/beta/_metadata.py +56 -0
  36. grpc/beta/_server_adaptations.py +465 -0
  37. grpc/beta/implementations.py +345 -0
  38. grpc/beta/interfaces.py +163 -0
  39. grpc/beta/utilities.py +153 -0
  40. grpc/experimental/__init__.py +134 -0
  41. grpc/experimental/aio/__init__.py +16 -0
  42. grpc/experimental/gevent.py +27 -0
  43. grpc/experimental/session_cache.py +45 -0
  44. grpc/framework/__init__.py +13 -0
  45. grpc/framework/common/__init__.py +13 -0
  46. grpc/framework/common/cardinality.py +26 -0
  47. grpc/framework/common/style.py +24 -0
  48. grpc/framework/foundation/__init__.py +13 -0
  49. grpc/framework/foundation/abandonment.py +22 -0
  50. grpc/framework/foundation/callable_util.py +98 -0
  51. grpc/framework/foundation/future.py +219 -0
  52. grpc/framework/foundation/logging_pool.py +72 -0
  53. grpc/framework/foundation/stream.py +43 -0
  54. grpc/framework/foundation/stream_util.py +148 -0
  55. grpc/framework/interfaces/__init__.py +13 -0
  56. grpc/framework/interfaces/base/__init__.py +13 -0
  57. grpc/framework/interfaces/base/base.py +328 -0
  58. grpc/framework/interfaces/base/utilities.py +83 -0
  59. grpc/framework/interfaces/face/__init__.py +13 -0
  60. grpc/framework/interfaces/face/face.py +1084 -0
  61. grpc/framework/interfaces/face/utilities.py +245 -0
  62. grpcio_fips-1.70.0.dist-info/LICENSE +610 -0
  63. grpcio_fips-1.70.0.dist-info/METADATA +130 -0
  64. grpcio_fips-1.70.0.dist-info/RECORD +66 -0
  65. grpcio_fips-1.70.0.dist-info/WHEEL +5 -0
  66. grpcio_fips-1.70.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,245 @@
1
+ # Copyright 2015 gRPC authors.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Utilities for RPC Framework's Face interface."""
15
+
16
+ import collections
17
+
18
+ # stream is referenced from specification in this module.
19
+ from grpc.framework.common import cardinality
20
+ from grpc.framework.common import style
21
+ from grpc.framework.foundation import stream # pylint: disable=unused-import
22
+ from grpc.framework.interfaces.face import face
23
+
24
+
25
+ class _MethodImplementation(
26
+ face.MethodImplementation,
27
+ collections.namedtuple(
28
+ "_MethodImplementation",
29
+ [
30
+ "cardinality",
31
+ "style",
32
+ "unary_unary_inline",
33
+ "unary_stream_inline",
34
+ "stream_unary_inline",
35
+ "stream_stream_inline",
36
+ "unary_unary_event",
37
+ "unary_stream_event",
38
+ "stream_unary_event",
39
+ "stream_stream_event",
40
+ ],
41
+ ),
42
+ ):
43
+ pass
44
+
45
+
46
+ def unary_unary_inline(behavior):
47
+ """Creates an face.MethodImplementation for the given behavior.
48
+
49
+ Args:
50
+ behavior: The implementation of a unary-unary RPC method as a callable value
51
+ that takes a request value and an face.ServicerContext object and
52
+ returns a response value.
53
+
54
+ Returns:
55
+ An face.MethodImplementation derived from the given behavior.
56
+ """
57
+ return _MethodImplementation(
58
+ cardinality.Cardinality.UNARY_UNARY,
59
+ style.Service.INLINE,
60
+ behavior,
61
+ None,
62
+ None,
63
+ None,
64
+ None,
65
+ None,
66
+ None,
67
+ None,
68
+ )
69
+
70
+
71
+ def unary_stream_inline(behavior):
72
+ """Creates an face.MethodImplementation for the given behavior.
73
+
74
+ Args:
75
+ behavior: The implementation of a unary-stream RPC method as a callable
76
+ value that takes a request value and an face.ServicerContext object and
77
+ returns an iterator of response values.
78
+
79
+ Returns:
80
+ An face.MethodImplementation derived from the given behavior.
81
+ """
82
+ return _MethodImplementation(
83
+ cardinality.Cardinality.UNARY_STREAM,
84
+ style.Service.INLINE,
85
+ None,
86
+ behavior,
87
+ None,
88
+ None,
89
+ None,
90
+ None,
91
+ None,
92
+ None,
93
+ )
94
+
95
+
96
+ def stream_unary_inline(behavior):
97
+ """Creates an face.MethodImplementation for the given behavior.
98
+
99
+ Args:
100
+ behavior: The implementation of a stream-unary RPC method as a callable
101
+ value that takes an iterator of request values and an
102
+ face.ServicerContext object and returns a response value.
103
+
104
+ Returns:
105
+ An face.MethodImplementation derived from the given behavior.
106
+ """
107
+ return _MethodImplementation(
108
+ cardinality.Cardinality.STREAM_UNARY,
109
+ style.Service.INLINE,
110
+ None,
111
+ None,
112
+ behavior,
113
+ None,
114
+ None,
115
+ None,
116
+ None,
117
+ None,
118
+ )
119
+
120
+
121
+ def stream_stream_inline(behavior):
122
+ """Creates an face.MethodImplementation for the given behavior.
123
+
124
+ Args:
125
+ behavior: The implementation of a stream-stream RPC method as a callable
126
+ value that takes an iterator of request values and an
127
+ face.ServicerContext object and returns an iterator of response values.
128
+
129
+ Returns:
130
+ An face.MethodImplementation derived from the given behavior.
131
+ """
132
+ return _MethodImplementation(
133
+ cardinality.Cardinality.STREAM_STREAM,
134
+ style.Service.INLINE,
135
+ None,
136
+ None,
137
+ None,
138
+ behavior,
139
+ None,
140
+ None,
141
+ None,
142
+ None,
143
+ )
144
+
145
+
146
+ def unary_unary_event(behavior):
147
+ """Creates an face.MethodImplementation for the given behavior.
148
+
149
+ Args:
150
+ behavior: The implementation of a unary-unary RPC method as a callable
151
+ value that takes a request value, a response callback to which to pass
152
+ the response value of the RPC, and an face.ServicerContext.
153
+
154
+ Returns:
155
+ An face.MethodImplementation derived from the given behavior.
156
+ """
157
+ return _MethodImplementation(
158
+ cardinality.Cardinality.UNARY_UNARY,
159
+ style.Service.EVENT,
160
+ None,
161
+ None,
162
+ None,
163
+ None,
164
+ behavior,
165
+ None,
166
+ None,
167
+ None,
168
+ )
169
+
170
+
171
+ def unary_stream_event(behavior):
172
+ """Creates an face.MethodImplementation for the given behavior.
173
+
174
+ Args:
175
+ behavior: The implementation of a unary-stream RPC method as a callable
176
+ value that takes a request value, a stream.Consumer to which to pass the
177
+ response values of the RPC, and an face.ServicerContext.
178
+
179
+ Returns:
180
+ An face.MethodImplementation derived from the given behavior.
181
+ """
182
+ return _MethodImplementation(
183
+ cardinality.Cardinality.UNARY_STREAM,
184
+ style.Service.EVENT,
185
+ None,
186
+ None,
187
+ None,
188
+ None,
189
+ None,
190
+ behavior,
191
+ None,
192
+ None,
193
+ )
194
+
195
+
196
+ def stream_unary_event(behavior):
197
+ """Creates an face.MethodImplementation for the given behavior.
198
+
199
+ Args:
200
+ behavior: The implementation of a stream-unary RPC method as a callable
201
+ value that takes a response callback to which to pass the response value
202
+ of the RPC and an face.ServicerContext and returns a stream.Consumer to
203
+ which the request values of the RPC should be passed.
204
+
205
+ Returns:
206
+ An face.MethodImplementation derived from the given behavior.
207
+ """
208
+ return _MethodImplementation(
209
+ cardinality.Cardinality.STREAM_UNARY,
210
+ style.Service.EVENT,
211
+ None,
212
+ None,
213
+ None,
214
+ None,
215
+ None,
216
+ None,
217
+ behavior,
218
+ None,
219
+ )
220
+
221
+
222
+ def stream_stream_event(behavior):
223
+ """Creates an face.MethodImplementation for the given behavior.
224
+
225
+ Args:
226
+ behavior: The implementation of a stream-stream RPC method as a callable
227
+ value that takes a stream.Consumer to which to pass the response values
228
+ of the RPC and an face.ServicerContext and returns a stream.Consumer to
229
+ which the request values of the RPC should be passed.
230
+
231
+ Returns:
232
+ An face.MethodImplementation derived from the given behavior.
233
+ """
234
+ return _MethodImplementation(
235
+ cardinality.Cardinality.STREAM_STREAM,
236
+ style.Service.EVENT,
237
+ None,
238
+ None,
239
+ None,
240
+ None,
241
+ None,
242
+ None,
243
+ None,
244
+ behavior,
245
+ )