__init__.py 1.2 KB
Newer Older
1
from redis.client import Redis, StrictRedis
2
from redis.connection import (
3
    BlockingConnectionPool,
4 5
    ConnectionPool,
    Connection,
A
Andy McCurdy 已提交
6
    SSLConnection,
7
    UnixDomainSocketConnection
8
)
K
Kenneth Reitz 已提交
9
from redis.utils import from_url
10 11
from redis.exceptions import (
    AuthenticationError,
12
    AuthenticationWrongNumberOfArgsError,
13
    BusyLoadingError,
14
    ChildDeadlockedError,
15
    ConnectionError,
16 17
    DataError,
    InvalidResponse,
18
    PubSubError,
19
    ReadOnlyError,
20 21
    RedisError,
    ResponseError,
22 23
    TimeoutError,
    WatchError
24
)
25

26

A
Andy McCurdy 已提交
27 28 29 30 31 32 33
def int_or_str(value):
    try:
        return int(value)
    except ValueError:
        return value


A
3.5.1  
Andy McCurdy 已提交
34
__version__ = '3.5.1'
A
Andy McCurdy 已提交
35
VERSION = tuple(map(int_or_str, __version__.split('.')))
A
Andy McCurdy 已提交
36

37
__all__ = [
38
    'AuthenticationError',
39
    'AuthenticationWrongNumberOfArgsError',
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    'BlockingConnectionPool',
    'BusyLoadingError',
    'ChildDeadlockedError',
    'Connection',
    'ConnectionError',
    'ConnectionPool',
    'DataError',
    'from_url',
    'InvalidResponse',
    'PubSubError',
    'ReadOnlyError',
    'Redis',
    'RedisError',
    'ResponseError',
    'SSLConnection',
    'StrictRedis',
    'TimeoutError',
    'UnixDomainSocketConnection',
    'WatchError',
59
]