<commit_before>.. currentmodule:: limits

.. _storage:

================
Storage Backends
================

.. _storage-scheme:

Supported versions
=================

.. image:: https://img.shields.io/github/workflow/status/alisaifee/limits/Compatibility?label=Compatibility%20Tests&style=for-the-badge
   :alt: GitHub Workflow Status
   :target: https://github.com/alisaifee/limits/actions/workflows/compatibility.yml

-----

**limits** is tested and known to work with the following versions of the
dependency libraries and the associated storage versions.

The CI tests against these versions on a nightly basis and you can see
the results in `github <https://github.com/alisaifee/limits/actions/workflows/compatibility.yml>`_.

.. tabbed:: Redis

   Dependency versions:

     .. literalinclude:: ../../requirements/storage/redis.txt

   Dependency versions (async):

     .. literalinclude:: ../../requirements/storage/async-redis.txt

   `Redis <https://redis.io>`_

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SERVER_VERSION=[\d\.]+' | cut -d = -f 2"

   Redis with SSL

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SERVER_SSL_VERSION=[\d\.]+' | cut -d = -f 2"

  `Redis Sentinel <https://redis.io/topics/sentinel>`_

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SENTINEL_SERVER_VERSION=[\d\.]+' | cut -d = -f 2"

.. tabbed:: Redis Cluster

   Dependency versions:

     .. literalinclude:: ../../requirements/storage/rediscluster.txt

   Dependency versions (async):

     .. literalinclude:: ../../requirements/storage/async-redis.txt

   `Redis cluster <https://redis.io/topics/cluster-tutorial>`_

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SERVER_VERSION=[\d\.]+' | cut -d = -f 2"

.. tabbed:: Memcached<commit_msg>Fix indentation in storage docs<commit_after>.. currentmodule:: limits

.. _storage:

================
Storage Backends
================

.. _storage-scheme:

Supported versions
=================

.. image:: https://img.shields.io/github/workflow/status/alisaifee/limits/Compatibility?label=Compatibility%20Tests&style=for-the-badge
   :alt: GitHub Workflow Status
   :target: https://github.com/alisaifee/limits/actions/workflows/compatibility.yml

-----

**limits** is tested and known to work with the following versions of the
dependency libraries and the associated storage versions.

The CI tests against these versions on a nightly basis and you can see
the results in `github <https://github.com/alisaifee/limits/actions/workflows/compatibility.yml>`_.

.. tabbed:: Redis

   Dependency versions:

     .. literalinclude:: ../../requirements/storage/redis.txt

   Dependency versions (async):

     .. literalinclude:: ../../requirements/storage/async-redis.txt

   `Redis <https://redis.io>`_

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SERVER_VERSION=[\d\.]+' | cut -d = -f 2"

   Redis with SSL

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SERVER_SSL_VERSION=[\d\.]+' | cut -d = -f 2"

   `Redis Sentinel <https://redis.io/topics/sentinel>`_

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SENTINEL_SERVER_VERSION=[\d\.]+' | cut -d = -f 2"

.. tabbed:: Redis Cluster

   Dependency versions:

     .. literalinclude:: ../../requirements/storage/rediscluster.txt

   Dependency versions (async):

     .. literalinclude:: ../../requirements/storage/async-redis.txt

   `Redis cluster <https://redis.io/topics/cluster-tutorial>`_

     .. program-output:: bash -c "cat ../../.github/workflows/compatibility.yml | grep -o -P 'LIMITS_REDIS_SERVER_VERSION=[\d\.]+' | cut -d = -f 2"

.. tabbed:: Memcached
{'fraction_non_alphanumeric': 0.18264150943396226, 'fraction_numerical': 0.0030188679245283017, 'mean_word_length': 3.247863247863248, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 12, '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': '3705037', 'n_tokens_mistral': 1371, 'n_tokens_neox': 1241, 'n_words': 291}