This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Warning

This module is not maintained anymore. Please use http://pypi.python.org/pypi/django-redisdb

Goal

Provide Redis backends for Django that faciliates using multiple Redis servers in the same time like if they were in master/master or sharded configuration.

Installation

Install requirements:

pip install redis hash_ring

Install Kido Redis:

pip install django-kidoredis

or current development version:

pip install hg+https:://bitbucket.org/kidosoft/django-kidoredis

Configuration

CACHES = {
    'redis_ring': {
        'BACKEND': 'kidoredis.backends.RedisRing',  # sharding backend
        'DB': 0,
        'LOCATION': [
            'localhost:6379',
            'localhost:6380',
        ]
    },
    'redis_copy': {
        'BACKEND': 'kidoredis.backends.RedisCopy',  # copying backend
        'DB': 0,
        'LOCATION': [
            'localhost:6379',
            'localhost:6380',
        ]
    }
}

Redis is configured as cache backend although it should be treat as specialized database. There are two backends:

Usage

After configuration access to Redis is done like to any other Django cache:

from django.core.cache import caches
caches['redis_ring'].set('key1', 1)  # set key1 only on on server
caches['redis_copy'].set('key2', 2)  # set key2 on all servers
result_list = caches['redis_copy'].zrange('key3', 1, 10)  # redis only command

Caveats

RedisCopy can save data to many nodes. Each of this nodes can return different result on save. For that reason commands that save data to nodes returns list of results from each node. E.g. with two nodes set for redis_copy:

>>> print caches['redis_copy'].set('key1', 2)
[True, True]

Supported Django versions

Tested with:

  • Django 1.2.7 on python2.7
  • Django 1.3.7 on python2.7
  • Django 1.4.16 on python2.7
  • Django 1.5.11 on python2.7, python3.4
  • Django 1.6.8 on python2.7, python3.4
  • Django 1.7.1 on python2.7, python3.4
Release History

Release History

1.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-kidoredis-1.0.1.tar.gz (56.3 kB) Copy SHA256 Checksum SHA256 Source Mar 23, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting