<commit_before>Redis Shard
###########

.. image:: https://img.shields.io/travis/zhihu/redis-shard.svg?style=flat
   :target: https://travis-ci.org/zhihu/redis-shard
   :alt: Build Status

.. image:: https://pypip.in/version/redis-shard/badge.svg?style=flat
    :target: https://pypi.python.org/pypi/redis-shard
    :alt: Latest Version

.. image:: https://pypip.in/py_versions/redis-shard/badge.svg?style=flat
    :target: https://pypi.python.org/pypi/redis-shard
    :alt: Supported Python versions

.. image:: https://pypip.in/license/redis-shard/badge.svg?style=flat
    :target: https://pypi.python.org/pypi/redis-shard
    :alt: License

A Redis sharding implementation.

Redis is great. It's fast, lightweight and easy to use. But when we want to store
a mass of data into one single instance, we may encounter some problems such as performance
degradation and slow recovery and we need to scale it.

Usage
=====

First, Create an RedisShardAPI instance with multiple nodes, node ``name`` **must be unique**::

    from redis_shard.shard import RedisShardAPI
<commit_msg>Switched broken pypip.in badges to shields.io<commit_after>Redis Shard
###########

.. image:: https://img.shields.io/travis/zhihu/redis-shard.svg?style=flat
   :target: https://travis-ci.org/zhihu/redis-shard
   :alt: Build Status

.. image:: https://img.shields.io/pypi/v/redis-shard.svg?style=flat
    :target: https://pypi.python.org/pypi/redis-shard
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/redis-shard.svg?style=flat
    :target: https://pypi.python.org/pypi/redis-shard
    :alt: Supported Python versions

.. image:: https://img.shields.io/pypi/l/redis-shard.svg?style=flat
    :target: https://pypi.python.org/pypi/redis-shard
    :alt: License

A Redis sharding implementation.

Redis is great. It's fast, lightweight and easy to use. But when we want to store
a mass of data into one single instance, we may encounter some problems such as performance
degradation and slow recovery and we need to scale it.

Usage
=====

First, Create an RedisShardAPI instance with multiple nodes, node ``name`` **must be unique**::

    from redis_shard.shard import RedisShardAPI

{'fraction_non_alphanumeric': 0.13744292237442923, 'fraction_numerical': 0.0, 'mean_word_length': 3.9235955056179774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6105928', 'n_tokens_mistral': 781, 'n_tokens_neox': 755, 'n_words': 193}