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