blob: f534d25c639b19c636f8c0748ba1b7cf2a7105db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
gRPC
=============
.. module:: grpc
Tutorial
--------
If you want to see gRPC in action first, visit the `Python Quickstart <https://grpc.io/docs/quickstart/python.html>`_.
Or, if you would like dive in with more extensive usage of gRPC Python, check `gRPC Basics - Python <https://grpc.io/docs/tutorials/basic/python.html>`_ out.
Example
-------
Go to `gRPC Python Examples <https://github.com/grpc/grpc/tree/master/examples/python>`_
Module Contents
---------------
Version
^^^^^^^
The version string is available as :code:`grpc.__version__`.
Create Client
^^^^^^^^^^^^^
.. autofunction:: insecure_channel
.. autofunction:: secure_channel
.. autofunction:: intercept_channel
Create Client Credentials
^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: ssl_channel_credentials
.. autofunction:: metadata_call_credentials
.. autofunction:: access_token_call_credentials
.. autofunction:: composite_call_credentials
.. autofunction:: composite_channel_credentials
Create Server
^^^^^^^^^^^^^
.. autofunction:: server
Create Server Credentials
^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: ssl_server_credentials
.. autofunction:: ssl_server_certificate_configuration
.. autofunction:: dynamic_ssl_server_credentials
RPC Method Handlers
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: unary_unary_rpc_method_handler
.. autofunction:: unary_stream_rpc_method_handler
.. autofunction:: stream_unary_rpc_method_handler
.. autofunction:: stream_stream_rpc_method_handler
.. autofunction:: method_handlers_generic_handler
Channel Ready Future
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: channel_ready_future
Channel Connectivity
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: ChannelConnectivity
gRPC Status Code
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: StatusCode
Channel Object
^^^^^^^^^^^^^^
.. autoclass:: Channel
Server Object
^^^^^^^^^^^^^
.. autoclass:: Server
Authentication & Authorization Objects
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: ChannelCredentials
.. autoclass:: CallCredentials
.. autoclass:: AuthMetadataContext
.. autoclass:: AuthMetadataPluginCallback
.. autoclass:: AuthMetadataPlugin
.. autoclass:: ServerCredentials
.. autoclass:: ServerCertificateConfiguration
gRPC Exceptions
^^^^^^^^^^^^^^^
.. autoexception:: RpcError
Shared Context
^^^^^^^^^^^^^^
.. autoclass:: RpcContext
Client-Side Context
^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: Call
Client-Side Interceptor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: ClientCallDetails
.. autoclass:: UnaryUnaryClientInterceptor
.. autoclass:: UnaryStreamClientInterceptor
.. autoclass:: StreamUnaryClientInterceptor
.. autoclass:: StreamStreamClientInterceptor
Service-Side Context
^^^^^^^^^^^^^^^^^^^^
.. autoclass:: ServicerContext
Service-Side Handler
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: RpcMethodHandler
.. autoclass:: HandlerCallDetails
.. autoclass:: GenericRpcHandler
.. autoclass:: ServiceRpcHandler
Service-Side Interceptor
^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: ServerInterceptor
Multi-Callable Interfaces
^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: UnaryUnaryMultiCallable
.. autoclass:: UnaryStreamMultiCallable
.. autoclass:: StreamUnaryMultiCallable
.. autoclass:: StreamStreamMultiCallable
Future Interfaces
^^^^^^^^^^^^^^^^^
.. autoexception:: FutureTimeoutError
.. autoexception:: FutureCancelledError
.. autoclass:: Future
|