Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/grpc/aio/__init__.py: 97%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

39 statements  

1# Copyright 2019 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"""gRPC's Asynchronous Python API. 

15 

16gRPC Async API objects may only be used on the thread on which they were 

17created. AsyncIO doesn't provide thread safety for most of its APIs. 

18""" 

19 

20from typing import Any, Optional, Sequence, Tuple 

21 

22import grpc 

23from grpc._cython.cygrpc import AbortError 

24from grpc._cython.cygrpc import BaseError 

25from grpc._cython.cygrpc import EOF 

26from grpc._cython.cygrpc import InternalError 

27from grpc._cython.cygrpc import UsageError 

28from grpc._cython.cygrpc import init_grpc_aio 

29from grpc._cython.cygrpc import shutdown_grpc_aio 

30 

31from ._base_call import Call 

32from ._base_call import RpcContext 

33from ._base_call import StreamStreamCall 

34from ._base_call import StreamUnaryCall 

35from ._base_call import UnaryStreamCall 

36from ._base_call import UnaryUnaryCall 

37from ._base_channel import Channel 

38from ._base_channel import StreamStreamMultiCallable 

39from ._base_channel import StreamUnaryMultiCallable 

40from ._base_channel import UnaryStreamMultiCallable 

41from ._base_channel import UnaryUnaryMultiCallable 

42from ._base_server import Server 

43from ._base_server import ServicerContext 

44from ._call import AioRpcError 

45from ._channel import insecure_channel 

46from ._channel import secure_channel 

47from ._interceptor import ClientCallDetails 

48from ._interceptor import ClientInterceptor 

49from ._interceptor import InterceptedUnaryUnaryCall 

50from ._interceptor import ServerInterceptor 

51from ._interceptor import StreamStreamClientInterceptor 

52from ._interceptor import StreamUnaryClientInterceptor 

53from ._interceptor import UnaryStreamClientInterceptor 

54from ._interceptor import UnaryUnaryClientInterceptor 

55from ._metadata import Metadata 

56from ._server import server 

57from ._typing import ChannelArgumentType 

58 

59################################### __all__ ################################# 

60 

61__all__ = ( 

62 "init_grpc_aio", 

63 "shutdown_grpc_aio", 

64 "AioRpcError", 

65 "RpcContext", 

66 "Call", 

67 "UnaryUnaryCall", 

68 "UnaryStreamCall", 

69 "StreamUnaryCall", 

70 "StreamStreamCall", 

71 "Channel", 

72 "UnaryUnaryMultiCallable", 

73 "UnaryStreamMultiCallable", 

74 "StreamUnaryMultiCallable", 

75 "StreamStreamMultiCallable", 

76 "ClientCallDetails", 

77 "ClientInterceptor", 

78 "UnaryStreamClientInterceptor", 

79 "UnaryUnaryClientInterceptor", 

80 "StreamUnaryClientInterceptor", 

81 "StreamStreamClientInterceptor", 

82 "InterceptedUnaryUnaryCall", 

83 "ServerInterceptor", 

84 "insecure_channel", 

85 "server", 

86 "Server", 

87 "ServicerContext", 

88 "EOF", 

89 "secure_channel", 

90 "AbortError", 

91 "BaseError", 

92 "UsageError", 

93 "InternalError", 

94 "Metadata", 

95)