|
grpc.Channel | _create_channel (str target, Sequence[Tuple[str, str]] options, Optional[grpc.ChannelCredentials] channel_credentials, Optional[grpc.Compression] compression) |
|
Iterator[ResponseType] | stream_stream (Iterator[RequestType] request_iterator, str target, str method, Optional[Callable[[Any], bytes]] request_serializer=None, Optional[Callable[[bytes], Any]] response_deserializer=None, Sequence[Tuple[AnyStr, AnyStr]] options=(), Optional[grpc.ChannelCredentials] channel_credentials=None, bool insecure=False, Optional[grpc.CallCredentials] call_credentials=None, Optional[grpc.Compression] compression=None, Optional[bool] wait_for_ready=None, Optional[float] timeout=_DEFAULT_TIMEOUT, Optional[Sequence[Tuple[str, Union[str, bytes]]]] metadata=None) |
|
ResponseType | stream_unary (Iterator[RequestType] request_iterator, str target, str method, Optional[Callable[[Any], bytes]] request_serializer=None, Optional[Callable[[bytes], Any]] response_deserializer=None, Sequence[Tuple[AnyStr, AnyStr]] options=(), Optional[grpc.ChannelCredentials] channel_credentials=None, bool insecure=False, Optional[grpc.CallCredentials] call_credentials=None, Optional[grpc.Compression] compression=None, Optional[bool] wait_for_ready=None, Optional[float] timeout=_DEFAULT_TIMEOUT, Optional[Sequence[Tuple[str, Union[str, bytes]]]] metadata=None) |
|
Iterator[ResponseType] | unary_stream (RequestType request, str target, str method, Optional[Callable[[Any], bytes]] request_serializer=None, Optional[Callable[[bytes], Any]] response_deserializer=None, Sequence[Tuple[AnyStr, AnyStr]] options=(), Optional[grpc.ChannelCredentials] channel_credentials=None, bool insecure=False, Optional[grpc.CallCredentials] call_credentials=None, Optional[grpc.Compression] compression=None, Optional[bool] wait_for_ready=None, Optional[float] timeout=_DEFAULT_TIMEOUT, Optional[Sequence[Tuple[str, Union[str, bytes]]]] metadata=None) |
|
ResponseType | unary_unary (RequestType request, str target, str method, Optional[Callable[[Any], bytes]] request_serializer=None, Optional[Callable[[bytes], Any]] response_deserializer=None, Sequence[Tuple[AnyStr, AnyStr]] options=(), Optional[grpc.ChannelCredentials] channel_credentials=None, bool insecure=False, Optional[grpc.CallCredentials] call_credentials=None, Optional[grpc.Compression] compression=None, Optional[bool] wait_for_ready=None, Optional[float] timeout=_DEFAULT_TIMEOUT, Optional[Sequence[Tuple[str, Union[str, bytes]]]] metadata=None) |
|
Iterator[ResponseType] grpc._simple_stubs.stream_stream |
( |
Iterator[RequestType] |
request_iterator, |
|
|
str |
target, |
|
|
str |
method, |
|
|
Optional[Callable[[Any], bytes]] |
request_serializer = None , |
|
|
Optional[Callable[[bytes], Any]] |
response_deserializer = None , |
|
|
Sequence[Tuple[AnyStr, AnyStr]] |
options = () , |
|
|
Optional[grpc.ChannelCredentials] |
channel_credentials = None , |
|
|
bool |
insecure = False , |
|
|
Optional[grpc.CallCredentials] |
call_credentials = None , |
|
|
Optional[grpc.Compression] |
compression = None , |
|
|
Optional[bool] |
wait_for_ready = None , |
|
|
Optional[float] |
timeout = _DEFAULT_TIMEOUT , |
|
|
Optional[Sequence[Tuple[str, Union[str, bytes]]]] |
metadata = None |
|
) |
| |
Invokes a stream-stream RPC without an explicitly specified channel.
THIS IS AN EXPERIMENTAL API.
This is backed by a per-process cache of channels. Channels are evicted
from the cache after a fixed period by a background. Channels will also be
evicted if more than a configured maximum accumulate.
The default eviction period is 10 minutes. One may set the environment
variable "GRPC_PYTHON_MANAGED_CHANNEL_EVICTION_SECONDS" to configure this.
The default maximum number of channels is 256. One may set the
environment variable "GRPC_PYTHON_MANAGED_CHANNEL_MAXIMUM" to configure
this.
Args:
request_iterator: An iterator that yields request values for the RPC.
target: The server address.
method: The name of the RPC method.
request_serializer: Optional :term:`serializer` for serializing the request
message. Request goes unserialized in case None is passed.
response_deserializer: Optional :term:`deserializer` for deserializing the response
message. Response goes undeserialized in case None is passed.
options: An optional list of key-value pairs (:term:`channel_arguments` in gRPC Core
runtime) to configure the channel.
channel_credentials: A credential applied to the whole channel, e.g. the
return value of grpc.ssl_channel_credentials().
call_credentials: A call credential applied to each call individually,
e.g. the output of grpc.metadata_call_credentials() or
grpc.access_token_call_credentials().
insecure: If True, specifies channel_credentials as
:term:`grpc.insecure_channel_credentials()`. This option is mutually
exclusive with the `channel_credentials` option.
compression: An optional value indicating the compression method to be
used over the lifetime of the channel, e.g. grpc.Compression.Gzip.
wait_for_ready: An optional flag indicating whether the RPC should fail
immediately if the connection is not ready at the time the RPC is
invoked, or if it should wait until the connection to the server
becomes ready. When using this option, the user will likely also want
to set a timeout. Defaults to True.
timeout: An optional duration of time in seconds to allow for the RPC,
after which an exception will be raised. If timeout is unspecified,
defaults to a timeout controlled by the
GRPC_PYTHON_DEFAULT_TIMEOUT_SECONDS environment variable. If that is
unset, defaults to 60 seconds. Supply a value of None to indicate that
no timeout should be enforced.
metadata: Optional metadata to send to the server.
Returns:
An iterator of responses.
Definition at line 410 of file _simple_stubs.py.
ResponseType grpc._simple_stubs.stream_unary |
( |
Iterator[RequestType] |
request_iterator, |
|
|
str |
target, |
|
|
str |
method, |
|
|
Optional[Callable[[Any], bytes]] |
request_serializer = None , |
|
|
Optional[Callable[[bytes], Any]] |
response_deserializer = None , |
|
|
Sequence[Tuple[AnyStr, AnyStr]] |
options = () , |
|
|
Optional[grpc.ChannelCredentials] |
channel_credentials = None , |
|
|
bool |
insecure = False , |
|
|
Optional[grpc.CallCredentials] |
call_credentials = None , |
|
|
Optional[grpc.Compression] |
compression = None , |
|
|
Optional[bool] |
wait_for_ready = None , |
|
|
Optional[float] |
timeout = _DEFAULT_TIMEOUT , |
|
|
Optional[Sequence[Tuple[str, Union[str, bytes]]]] |
metadata = None |
|
) |
| |
Invokes a stream-unary RPC without an explicitly specified channel.
THIS IS AN EXPERIMENTAL API.
This is backed by a per-process cache of channels. Channels are evicted
from the cache after a fixed period by a background. Channels will also be
evicted if more than a configured maximum accumulate.
The default eviction period is 10 minutes. One may set the environment
variable "GRPC_PYTHON_MANAGED_CHANNEL_EVICTION_SECONDS" to configure this.
The default maximum number of channels is 256. One may set the
environment variable "GRPC_PYTHON_MANAGED_CHANNEL_MAXIMUM" to configure
this.
Args:
request_iterator: An iterator that yields request values for the RPC.
target: The server address.
method: The name of the RPC method.
request_serializer: Optional :term:`serializer` for serializing the request
message. Request goes unserialized in case None is passed.
response_deserializer: Optional :term:`deserializer` for deserializing the response
message. Response goes undeserialized in case None is passed.
options: An optional list of key-value pairs (:term:`channel_arguments` in gRPC Core
runtime) to configure the channel.
channel_credentials: A credential applied to the whole channel, e.g. the
return value of grpc.ssl_channel_credentials().
call_credentials: A call credential applied to each call individually,
e.g. the output of grpc.metadata_call_credentials() or
grpc.access_token_call_credentials().
insecure: If True, specifies channel_credentials as
:term:`grpc.insecure_channel_credentials()`. This option is mutually
exclusive with the `channel_credentials` option.
compression: An optional value indicating the compression method to be
used over the lifetime of the channel, e.g. grpc.Compression.Gzip.
wait_for_ready: An optional flag indicating whether the RPC should fail
immediately if the connection is not ready at the time the RPC is
invoked, or if it should wait until the connection to the server
becomes ready. When using this option, the user will likely also want
to set a timeout. Defaults to True.
timeout: An optional duration of time in seconds to allow for the RPC,
after which an exception will be raised. If timeout is unspecified,
defaults to a timeout controlled by the
GRPC_PYTHON_DEFAULT_TIMEOUT_SECONDS environment variable. If that is
unset, defaults to 60 seconds. Supply a value of None to indicate that
no timeout should be enforced.
metadata: Optional metadata to send to the server.
Returns:
The response to the RPC.
Definition at line 330 of file _simple_stubs.py.
Iterator[ResponseType] grpc._simple_stubs.unary_stream |
( |
RequestType |
request, |
|
|
str |
target, |
|
|
str |
method, |
|
|
Optional[Callable[[Any], bytes]] |
request_serializer = None , |
|
|
Optional[Callable[[bytes], Any]] |
response_deserializer = None , |
|
|
Sequence[Tuple[AnyStr, AnyStr]] |
options = () , |
|
|
Optional[grpc.ChannelCredentials] |
channel_credentials = None , |
|
|
bool |
insecure = False , |
|
|
Optional[grpc.CallCredentials] |
call_credentials = None , |
|
|
Optional[grpc.Compression] |
compression = None , |
|
|
Optional[bool] |
wait_for_ready = None , |
|
|
Optional[float] |
timeout = _DEFAULT_TIMEOUT , |
|
|
Optional[Sequence[Tuple[str, Union[str, bytes]]]] |
metadata = None |
|
) |
| |
Invokes a unary-stream RPC without an explicitly specified channel.
THIS IS AN EXPERIMENTAL API.
This is backed by a per-process cache of channels. Channels are evicted
from the cache after a fixed period by a background. Channels will also be
evicted if more than a configured maximum accumulate.
The default eviction period is 10 minutes. One may set the environment
variable "GRPC_PYTHON_MANAGED_CHANNEL_EVICTION_SECONDS" to configure this.
The default maximum number of channels is 256. One may set the
environment variable "GRPC_PYTHON_MANAGED_CHANNEL_MAXIMUM" to configure
this.
Args:
request: An iterator that yields request values for the RPC.
target: The server address.
method: The name of the RPC method.
request_serializer: Optional :term:`serializer` for serializing the request
message. Request goes unserialized in case None is passed.
response_deserializer: Optional :term:`deserializer` for deserializing the response
message. Response goes undeserialized in case None is passed.
options: An optional list of key-value pairs (:term:`channel_arguments` in gRPC Core
runtime) to configure the channel.
channel_credentials: A credential applied to the whole channel, e.g. the
return value of grpc.ssl_channel_credentials().
insecure: If True, specifies channel_credentials as
:term:`grpc.insecure_channel_credentials()`. This option is mutually
exclusive with the `channel_credentials` option.
call_credentials: A call credential applied to each call individually,
e.g. the output of grpc.metadata_call_credentials() or
grpc.access_token_call_credentials().
compression: An optional value indicating the compression method to be
used over the lifetime of the channel, e.g. grpc.Compression.Gzip.
wait_for_ready: An optional flag indicating whether the RPC should fail
immediately if the connection is not ready at the time the RPC is
invoked, or if it should wait until the connection to the server
becomes ready. When using this option, the user will likely also want
to set a timeout. Defaults to True.
timeout: An optional duration of time in seconds to allow for the RPC,
after which an exception will be raised. If timeout is unspecified,
defaults to a timeout controlled by the
GRPC_PYTHON_DEFAULT_TIMEOUT_SECONDS environment variable. If that is
unset, defaults to 60 seconds. Supply a value of None to indicate that
no timeout should be enforced.
metadata: Optional metadata to send to the server.
Returns:
An iterator of responses.
Definition at line 250 of file _simple_stubs.py.
ResponseType grpc._simple_stubs.unary_unary |
( |
RequestType |
request, |
|
|
str |
target, |
|
|
str |
method, |
|
|
Optional[Callable[[Any], bytes]] |
request_serializer = None , |
|
|
Optional[Callable[[bytes], Any]] |
response_deserializer = None , |
|
|
Sequence[Tuple[AnyStr, AnyStr]] |
options = () , |
|
|
Optional[grpc.ChannelCredentials] |
channel_credentials = None , |
|
|
bool |
insecure = False , |
|
|
Optional[grpc.CallCredentials] |
call_credentials = None , |
|
|
Optional[grpc.Compression] |
compression = None , |
|
|
Optional[bool] |
wait_for_ready = None , |
|
|
Optional[float] |
timeout = _DEFAULT_TIMEOUT , |
|
|
Optional[Sequence[Tuple[str, Union[str, bytes]]]] |
metadata = None |
|
) |
| |
Invokes a unary-unary RPC without an explicitly specified channel.
THIS IS AN EXPERIMENTAL API.
This is backed by a per-process cache of channels. Channels are evicted
from the cache after a fixed period by a background. Channels will also be
evicted if more than a configured maximum accumulate.
The default eviction period is 10 minutes. One may set the environment
variable "GRPC_PYTHON_MANAGED_CHANNEL_EVICTION_SECONDS" to configure this.
The default maximum number of channels is 256. One may set the
environment variable "GRPC_PYTHON_MANAGED_CHANNEL_MAXIMUM" to configure
this.
Args:
request: An iterator that yields request values for the RPC.
target: The server address.
method: The name of the RPC method.
request_serializer: Optional :term:`serializer` for serializing the request
message. Request goes unserialized in case None is passed.
response_deserializer: Optional :term:`deserializer` for deserializing the response
message. Response goes undeserialized in case None is passed.
options: An optional list of key-value pairs (:term:`channel_arguments` in gRPC Core
runtime) to configure the channel.
channel_credentials: A credential applied to the whole channel, e.g. the
return value of grpc.ssl_channel_credentials() or
grpc.insecure_channel_credentials().
insecure: If True, specifies channel_credentials as
:term:`grpc.insecure_channel_credentials()`. This option is mutually
exclusive with the `channel_credentials` option.
call_credentials: A call credential applied to each call individually,
e.g. the output of grpc.metadata_call_credentials() or
grpc.access_token_call_credentials().
compression: An optional value indicating the compression method to be
used over the lifetime of the channel, e.g. grpc.Compression.Gzip.
wait_for_ready: An optional flag indicating whether the RPC should fail
immediately if the connection is not ready at the time the RPC is
invoked, or if it should wait until the connection to the server
becomes ready. When using this option, the user will likely also want
to set a timeout. Defaults to True.
timeout: An optional duration of time in seconds to allow for the RPC,
after which an exception will be raised. If timeout is unspecified,
defaults to a timeout controlled by the
GRPC_PYTHON_DEFAULT_TIMEOUT_SECONDS environment variable. If that is
unset, defaults to 60 seconds. Supply a value of None to indicate that
no timeout should be enforced.
metadata: Optional metadata to send to the server.
Returns:
The response to the RPC.
Definition at line 169 of file _simple_stubs.py.