Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/redis/__init__.py: 90%

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

20 statements  

1from redis import asyncio # noqa 

2from redis.backoff import default_backoff 

3from redis.client import Redis, StrictRedis 

4from redis.driver_info import DriverInfo 

5from redis.cluster import RedisCluster 

6from redis.connection import ( 

7 BlockingConnectionPool, 

8 Connection, 

9 ConnectionPool, 

10 SSLConnection, 

11 UnixDomainSocketConnection, 

12) 

13from redis.credentials import CredentialProvider, UsernamePasswordCredentialProvider 

14from redis.keyspace_notifications import ( 

15 ChannelType, 

16 ClusterKeyspaceNotifications, 

17 EventType, 

18 KeyeventChannel, 

19 KeyNotification, 

20 KeyspaceChannel, 

21 KeyspaceNotifications, 

22 KeyspaceNotificationsInterface, 

23 KeyspaceWorkerThread, 

24 SubkeyeventChannel, 

25 SubkeyspaceChannel, 

26 SubkeyspaceeventChannel, 

27 SubkeyspaceitemChannel, 

28 get_channel_type, 

29) 

30from redis.exceptions import ( 

31 AuthenticationError, 

32 AuthenticationWrongNumberOfArgsError, 

33 BusyLoadingError, 

34 ChildDeadlockedError, 

35 ConnectionError, 

36 CrossSlotTransactionError, 

37 DataError, 

38 InvalidPipelineStack, 

39 InvalidResponse, 

40 MaxClientsReachedError, 

41 MaxConnectionsError, 

42 OutOfMemoryError, 

43 PubSubError, 

44 ReadOnlyError, 

45 RedisClusterException, 

46 RedisError, 

47 ResponseError, 

48 TimeoutError, 

49 WatchError, 

50) 

51from redis.sentinel import ( 

52 Sentinel, 

53 SentinelConnectionPool, 

54 SentinelManagedConnection, 

55 SentinelManagedSSLConnection, 

56) 

57from redis.typing import Subscription 

58from redis.utils import from_url 

59 

60 

61def int_or_str(value): 

62 try: 

63 return int(value) 

64 except ValueError: 

65 return value 

66 

67 

68__version__ = "8.0.0" 

69 

70VERSION = tuple(map(int_or_str, __version__.split("."))) 

71 

72 

73__all__ = [ 

74 "AuthenticationError", 

75 "AuthenticationWrongNumberOfArgsError", 

76 "BlockingConnectionPool", 

77 "BusyLoadingError", 

78 "ChannelType", 

79 "ChildDeadlockedError", 

80 "ClusterKeyspaceNotifications", 

81 "Connection", 

82 "ConnectionError", 

83 "ConnectionPool", 

84 "CredentialProvider", 

85 "CrossSlotTransactionError", 

86 "DataError", 

87 "DriverInfo", 

88 "EventType", 

89 "from_url", 

90 "default_backoff", 

91 "InvalidPipelineStack", 

92 "InvalidResponse", 

93 "KeyeventChannel", 

94 "KeyNotification", 

95 "KeyspaceChannel", 

96 "KeyspaceNotifications", 

97 "KeyspaceNotificationsInterface", 

98 "KeyspaceWorkerThread", 

99 "SubkeyeventChannel", 

100 "SubkeyspaceChannel", 

101 "SubkeyspaceeventChannel", 

102 "SubkeyspaceitemChannel", 

103 "get_channel_type", 

104 "MaxClientsReachedError", 

105 "MaxConnectionsError", 

106 "OutOfMemoryError", 

107 "PubSubError", 

108 "ReadOnlyError", 

109 "Redis", 

110 "RedisCluster", 

111 "RedisClusterException", 

112 "RedisError", 

113 "ResponseError", 

114 "Sentinel", 

115 "SentinelConnectionPool", 

116 "SentinelManagedConnection", 

117 "SentinelManagedSSLConnection", 

118 "SSLConnection", 

119 "UsernamePasswordCredentialProvider", 

120 "StrictRedis", 

121 "Subscription", 

122 "TimeoutError", 

123 "UnixDomainSocketConnection", 

124 "WatchError", 

125]