__init__.py 1012 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. from redis.client import Redis, StrictRedis
  2. from redis.connection import (
  3. BlockingConnectionPool,
  4. ConnectionPool,
  5. Connection,
  6. SSLConnection,
  7. UnixDomainSocketConnection
  8. )
  9. from redis.utils import from_url
  10. from redis.exceptions import (
  11. AuthenticationError,
  12. BusyLoadingError,
  13. ConnectionError,
  14. DataError,
  15. InvalidResponse,
  16. PubSubError,
  17. ReadOnlyError,
  18. RedisError,
  19. ResponseError,
  20. TimeoutError,
  21. WatchError
  22. )
  23. def int_or_str(value):
  24. try:
  25. return int(value)
  26. except ValueError:
  27. return value
  28. __version__ = '3.0.1'
  29. VERSION = tuple(map(int_or_str, __version__.split('.')))
  30. __all__ = [
  31. 'Redis', 'StrictRedis', 'ConnectionPool', 'BlockingConnectionPool',
  32. 'Connection', 'SSLConnection', 'UnixDomainSocketConnection', 'from_url',
  33. 'AuthenticationError', 'BusyLoadingError', 'ConnectionError', 'DataError',
  34. 'InvalidResponse', 'PubSubError', 'ReadOnlyError', 'RedisError',
  35. 'ResponseError', 'TimeoutError', 'WatchError'
  36. ]