grpcio-fips 1.53.2__0-cp38-cp38-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 (62) hide show
  1. grpc/__init__.py +2174 -0
  2. grpc/_auth.py +68 -0
  3. grpc/_channel.py +1767 -0
  4. grpc/_common.py +177 -0
  5. grpc/_compression.py +63 -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/cygrpc.cp38-win_amd64.pyd +0 -0
  10. grpc/_grpcio_metadata.py +1 -0
  11. grpc/_interceptor.py +638 -0
  12. grpc/_plugin_wrapping.py +121 -0
  13. grpc/_runtime_protos.py +159 -0
  14. grpc/_server.py +1141 -0
  15. grpc/_simple_stubs.py +486 -0
  16. grpc/_typing.py +58 -0
  17. grpc/_utilities.py +180 -0
  18. grpc/aio/__init__.py +95 -0
  19. grpc/aio/_base_call.py +248 -0
  20. grpc/aio/_base_channel.py +348 -0
  21. grpc/aio/_base_server.py +369 -0
  22. grpc/aio/_call.py +649 -0
  23. grpc/aio/_channel.py +492 -0
  24. grpc/aio/_interceptor.py +1003 -0
  25. grpc/aio/_metadata.py +120 -0
  26. grpc/aio/_server.py +209 -0
  27. grpc/aio/_typing.py +35 -0
  28. grpc/aio/_utils.py +22 -0
  29. grpc/beta/__init__.py +13 -0
  30. grpc/beta/_client_adaptations.py +706 -0
  31. grpc/beta/_metadata.py +52 -0
  32. grpc/beta/_server_adaptations.py +385 -0
  33. grpc/beta/implementations.py +311 -0
  34. grpc/beta/interfaces.py +163 -0
  35. grpc/beta/utilities.py +149 -0
  36. grpc/experimental/__init__.py +128 -0
  37. grpc/experimental/aio/__init__.py +16 -0
  38. grpc/experimental/gevent.py +27 -0
  39. grpc/experimental/session_cache.py +45 -0
  40. grpc/framework/__init__.py +13 -0
  41. grpc/framework/common/__init__.py +13 -0
  42. grpc/framework/common/cardinality.py +26 -0
  43. grpc/framework/common/style.py +24 -0
  44. grpc/framework/foundation/__init__.py +13 -0
  45. grpc/framework/foundation/abandonment.py +22 -0
  46. grpc/framework/foundation/callable_util.py +94 -0
  47. grpc/framework/foundation/future.py +219 -0
  48. grpc/framework/foundation/logging_pool.py +71 -0
  49. grpc/framework/foundation/stream.py +43 -0
  50. grpc/framework/foundation/stream_util.py +148 -0
  51. grpc/framework/interfaces/__init__.py +13 -0
  52. grpc/framework/interfaces/base/__init__.py +13 -0
  53. grpc/framework/interfaces/base/base.py +325 -0
  54. grpc/framework/interfaces/base/utilities.py +71 -0
  55. grpc/framework/interfaces/face/__init__.py +13 -0
  56. grpc/framework/interfaces/face/face.py +1049 -0
  57. grpc/framework/interfaces/face/utilities.py +168 -0
  58. grpcio_fips-1.53.2.dist-info/LICENSE +610 -0
  59. grpcio_fips-1.53.2.dist-info/METADATA +139 -0
  60. grpcio_fips-1.53.2.dist-info/RECORD +62 -0
  61. grpcio_fips-1.53.2.dist-info/WHEEL +5 -0
  62. grpcio_fips-1.53.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,168 @@
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(face.MethodImplementation,
26
+ collections.namedtuple('_MethodImplementation', [
27
+ 'cardinality',
28
+ 'style',
29
+ 'unary_unary_inline',
30
+ 'unary_stream_inline',
31
+ 'stream_unary_inline',
32
+ 'stream_stream_inline',
33
+ 'unary_unary_event',
34
+ 'unary_stream_event',
35
+ 'stream_unary_event',
36
+ 'stream_stream_event',
37
+ ])):
38
+ pass
39
+
40
+
41
+ def unary_unary_inline(behavior):
42
+ """Creates an face.MethodImplementation for the given behavior.
43
+
44
+ Args:
45
+ behavior: The implementation of a unary-unary RPC method as a callable value
46
+ that takes a request value and an face.ServicerContext object and
47
+ returns a response value.
48
+
49
+ Returns:
50
+ An face.MethodImplementation derived from the given behavior.
51
+ """
52
+ return _MethodImplementation(cardinality.Cardinality.UNARY_UNARY,
53
+ style.Service.INLINE, behavior, None, None,
54
+ None, None, None, None, None)
55
+
56
+
57
+ def unary_stream_inline(behavior):
58
+ """Creates an face.MethodImplementation for the given behavior.
59
+
60
+ Args:
61
+ behavior: The implementation of a unary-stream RPC method as a callable
62
+ value that takes a request value and an face.ServicerContext object and
63
+ returns an iterator of response values.
64
+
65
+ Returns:
66
+ An face.MethodImplementation derived from the given behavior.
67
+ """
68
+ return _MethodImplementation(cardinality.Cardinality.UNARY_STREAM,
69
+ style.Service.INLINE, None, behavior, None,
70
+ None, None, None, None, None)
71
+
72
+
73
+ def stream_unary_inline(behavior):
74
+ """Creates an face.MethodImplementation for the given behavior.
75
+
76
+ Args:
77
+ behavior: The implementation of a stream-unary RPC method as a callable
78
+ value that takes an iterator of request values and an
79
+ face.ServicerContext object and returns a response value.
80
+
81
+ Returns:
82
+ An face.MethodImplementation derived from the given behavior.
83
+ """
84
+ return _MethodImplementation(cardinality.Cardinality.STREAM_UNARY,
85
+ style.Service.INLINE, None, None, behavior,
86
+ None, None, None, None, None)
87
+
88
+
89
+ def stream_stream_inline(behavior):
90
+ """Creates an face.MethodImplementation for the given behavior.
91
+
92
+ Args:
93
+ behavior: The implementation of a stream-stream RPC method as a callable
94
+ value that takes an iterator of request values and an
95
+ face.ServicerContext object and returns an iterator of response values.
96
+
97
+ Returns:
98
+ An face.MethodImplementation derived from the given behavior.
99
+ """
100
+ return _MethodImplementation(cardinality.Cardinality.STREAM_STREAM,
101
+ style.Service.INLINE, None, None, None,
102
+ behavior, None, None, None, None)
103
+
104
+
105
+ def unary_unary_event(behavior):
106
+ """Creates an face.MethodImplementation for the given behavior.
107
+
108
+ Args:
109
+ behavior: The implementation of a unary-unary RPC method as a callable
110
+ value that takes a request value, a response callback to which to pass
111
+ the response value of the RPC, and an face.ServicerContext.
112
+
113
+ Returns:
114
+ An face.MethodImplementation derived from the given behavior.
115
+ """
116
+ return _MethodImplementation(cardinality.Cardinality.UNARY_UNARY,
117
+ style.Service.EVENT, None, None, None, None,
118
+ behavior, None, None, None)
119
+
120
+
121
+ def unary_stream_event(behavior):
122
+ """Creates an face.MethodImplementation for the given behavior.
123
+
124
+ Args:
125
+ behavior: The implementation of a unary-stream RPC method as a callable
126
+ value that takes a request value, a stream.Consumer to which to pass the
127
+ the response values of the RPC, and an face.ServicerContext.
128
+
129
+ Returns:
130
+ An face.MethodImplementation derived from the given behavior.
131
+ """
132
+ return _MethodImplementation(cardinality.Cardinality.UNARY_STREAM,
133
+ style.Service.EVENT, None, None, None, None,
134
+ None, behavior, None, None)
135
+
136
+
137
+ def stream_unary_event(behavior):
138
+ """Creates an face.MethodImplementation for the given behavior.
139
+
140
+ Args:
141
+ behavior: The implementation of a stream-unary RPC method as a callable
142
+ value that takes a response callback to which to pass the response value
143
+ of the RPC and an face.ServicerContext and returns a stream.Consumer to
144
+ which the request values of the RPC should be passed.
145
+
146
+ Returns:
147
+ An face.MethodImplementation derived from the given behavior.
148
+ """
149
+ return _MethodImplementation(cardinality.Cardinality.STREAM_UNARY,
150
+ style.Service.EVENT, None, None, None, None,
151
+ None, None, behavior, None)
152
+
153
+
154
+ def stream_stream_event(behavior):
155
+ """Creates an face.MethodImplementation for the given behavior.
156
+
157
+ Args:
158
+ behavior: The implementation of a stream-stream RPC method as a callable
159
+ value that takes a stream.Consumer to which to pass the response values
160
+ of the RPC and an face.ServicerContext and returns a stream.Consumer to
161
+ which the request values of the RPC should be passed.
162
+
163
+ Returns:
164
+ An face.MethodImplementation derived from the given behavior.
165
+ """
166
+ return _MethodImplementation(cardinality.Cardinality.STREAM_STREAM,
167
+ style.Service.EVENT, None, None, None, None,
168
+ None, None, None, behavior)