Metadata-Version: 1.0
Name: redis-shard
Version: 0.1.2
Summary: Redis Sharding API
Home-page: http://blog.flyzen.com
Author: Young King
Author-email: yanckin@gmail.com
License: BSD
Description: Redis Shard
        ==============
        A redis sharding api. Sharding is done based on the CRC32 checksum of a key or key tag ("key{key_tag}"),
        according to this article http://antirez.com/post/redis-presharding.html .
        
        Useage
        ==============
        Creating a hash ring with multiple servers,By default the hash ring uses a crc32
        hashing algorithm on the server's ``name`` config.You can define the name anything
        as you like,but it must be unique.
        
        I don't want to bind the hashring with ipaddress,because if I do some master/slave switches,
        I can only change the ipaddress related config. The ``name`` is kept,so the hashring's order
        is kept.
        
        >>> from redis_shard.shard import RedisShardAPI
        >>> servers = [
        ...    {'name':'server1','host':'127.0.0.1','port':10000,'db':0},
        ...    {'name':'server2','host':'127.0.0.1','port':11000,'db':0},
        ...    {'name':'server3','host':'127.0.0.1','port':12000,'db':0},
        ...    {'name':'127.0.0.1:13000','host':'127.0.0.1','port':13000,'db':0},
        ...    ]
        >>>
        >>> client = RedisShardAPI(servers)
        >>> client.set('test',1)
        >>> print client.get('test')
        >>> client.zadd('testset','first',1)
        >>> client.zadd('testset','second',2)
        >>> print client.zrange('testset',0,-1)
        
        Hash tags
        ----------------
        see article `http://antirez.com/post/redis-presharding.html` for detail.
        
        >>> client.set('foo',2)
        >>> client.set('a{foo}',5)
        >>> client.set('b{foo}',5)
        >>> client.set('c{foo}',5)
        
        
        Change History
        ==============
        
        0.1.2 (2011-06-01)
        ------------------
        add MANIFEST.in file
        
        0.1.1 (2011-05-29)
        ------------------
        create hashring use server's name config.
        
        0.1 (2011-05-28)
        ------------------
        first version
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
