| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- import sys
- from redis import asyncio # noqa
- from redis.backoff import default_backoff
- from redis.client import Redis, StrictRedis
- from redis.cluster import RedisCluster
- from redis.connection import (
- BlockingConnectionPool,
- Connection,
- ConnectionPool,
- SSLConnection,
- UnixDomainSocketConnection,
- )
- from redis.credentials import CredentialProvider, UsernamePasswordCredentialProvider
- from redis.exceptions import (
- AuthenticationError,
- AuthenticationWrongNumberOfArgsError,
- BusyLoadingError,
- ChildDeadlockedError,
- ConnectionError,
- DataError,
- InvalidResponse,
- OutOfMemoryError,
- PubSubError,
- ReadOnlyError,
- RedisError,
- ResponseError,
- TimeoutError,
- WatchError,
- )
- from redis.sentinel import (
- Sentinel,
- SentinelConnectionPool,
- SentinelManagedConnection,
- SentinelManagedSSLConnection,
- )
- from redis.utils import from_url
- if sys.version_info >= (3, 8):
- from importlib import metadata
- else:
- import importlib_metadata as metadata
- def int_or_str(value):
- try:
- return int(value)
- except ValueError:
- return value
- try:
- __version__ = metadata.version("redis")
- except metadata.PackageNotFoundError:
- __version__ = "99.99.99"
- try:
- VERSION = tuple(map(int_or_str, __version__.split(".")))
- except AttributeError:
- VERSION = tuple([99, 99, 99])
- __all__ = [
- "AuthenticationError",
- "AuthenticationWrongNumberOfArgsError",
- "BlockingConnectionPool",
- "BusyLoadingError",
- "ChildDeadlockedError",
- "Connection",
- "ConnectionError",
- "ConnectionPool",
- "CredentialProvider",
- "DataError",
- "from_url",
- "default_backoff",
- "InvalidResponse",
- "OutOfMemoryError",
- "PubSubError",
- "ReadOnlyError",
- "Redis",
- "RedisCluster",
- "RedisError",
- "ResponseError",
- "Sentinel",
- "SentinelConnectionPool",
- "SentinelManagedConnection",
- "SentinelManagedSSLConnection",
- "SSLConnection",
- "UsernamePasswordCredentialProvider",
- "StrictRedis",
- "TimeoutError",
- "UnixDomainSocketConnection",
- "WatchError",
- ]
|