Skip to main content

Redis Clieht with customizable retrying capability.

Project description

https://img.shields.io/badge/License-GPL%20v3-blue.svg https://badge.fury.io/py/retry-redis.svg https://img.shields.io/travis/Gatsby-Lee/retry-redis.svg

retry-redis

Redis Clieht with customizable retrying capability.

Why did I build this?

There are Redis exceptions like below that can be handled by simply retrying it.

This package is built in order to help people who need to solve same problem.

  • redis.exceptions.ConnectionError

  • redis.exceptions.ResponseError

  • redis.exceptions.TimeoutError

Who should use?

Anybody who wants to have retry logic with Redis.

How to Install

pip install retry-redis

How To Use

Simply import retry decorated Redis and Use it.

import logging
from retry_redis import Redis

logging.basicConfig(level=logging.DEBUG)

r = Redis(port=6666)
r.lpush('list:test', 1)

# This log will be printed.
# DEBUG:retry_redis.decorated_redis:Finished call to 'redis.client.Redis.lpush' after 0.002(s), this was the 1st time calling it.
# DEBUG:retry_redis.decorated_redis:Finished call to 'redis.client.Redis.lpush' after 2.005(s), this was the 2nd time calling it.
# DEBUG:retry_redis.decorated_redis:Finished call to 'redis.client.Redis.lpush' after 6.009(s), this was the 3rd time calling it.

Package Dependency

  • redis

  • tenacity

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retry-redis-1.3.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

retry_redis-1.3.1-py2.py3-none-any.whl (16.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file retry-redis-1.3.1.tar.gz.

File metadata

  • Download URL: retry-redis-1.3.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for retry-redis-1.3.1.tar.gz
Algorithm Hash digest
SHA256 f7fc79546a178098a4e9c1df541c466bede0aeebe93e21ba53d8aca880ae6fe0
MD5 35ce2485b12ad25f1190dad23d8ad9b6
BLAKE2b-256 51a7a60088439eb7239ded003178e0ebcf630df5097913db329ffc21d3ed7731

See more details on using hashes here.

File details

Details for the file retry_redis-1.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for retry_redis-1.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3e589fbba34b6c3ad9fe884f10b486a2d608d5bd31740e50d456b697c89076b1
MD5 72eca7a431045fdeaccda85e5be6251b
BLAKE2b-256 1fa23d45e100856f3691c9c55f6287dcbd53824b731caa80bf84ceb4fdda3d52

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page