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
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
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 MaxConnectionsError,
41 OutOfMemoryError,
42 PubSubError,
43 ReadOnlyError,
44 RedisClusterException,
45 RedisError,
46 ResponseError,
47 TimeoutError,
48 WatchError,
49)
50from redis.sentinel import (
51 Sentinel,
52 SentinelConnectionPool,
53 SentinelManagedConnection,
54 SentinelManagedSSLConnection,
55)
56from redis.commands.core import GCRAResponse
57from redis.utils import from_url
60def int_or_str(value):
61 try:
62 return int(value)
63 except ValueError:
64 return value
67__version__ = "7.3.0"
69VERSION = tuple(map(int_or_str, __version__.split(".")))
72__all__ = [
73 "AuthenticationError",
74 "AuthenticationWrongNumberOfArgsError",
75 "BlockingConnectionPool",
76 "BusyLoadingError",
77 "ChannelType",
78 "ChildDeadlockedError",
79 "ClusterKeyspaceNotifications",
80 "Connection",
81 "ConnectionError",
82 "ConnectionPool",
83 "CredentialProvider",
84 "CrossSlotTransactionError",
85 "DataError",
86 "DriverInfo",
87 "EventType",
88 "from_url",
89 "GCRAResponse",
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 "MaxConnectionsError",
105 "OutOfMemoryError",
106 "PubSubError",
107 "ReadOnlyError",
108 "Redis",
109 "RedisCluster",
110 "RedisClusterException",
111 "RedisError",
112 "ResponseError",
113 "Sentinel",
114 "SentinelConnectionPool",
115 "SentinelManagedConnection",
116 "SentinelManagedSSLConnection",
117 "SSLConnection",
118 "UsernamePasswordCredentialProvider",
119 "StrictRedis",
120 "TimeoutError",
121 "UnixDomainSocketConnection",
122 "WatchError",
123]