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