<commit_before># fakeredis

This is a Redis mock. WIP.

## Design decisions

- no multiple DBs support
- strings are bundled in tables internally<commit_msg>Better README<commit_after># fakeredis

## Presentation

fakeredis is a Redis mock for Lua with the same interface as [redis-lua](https://github.com/nrk/redis-lua).

## Dependencies

None. Tests require [cwtest](https://github.com/catwell/cwtest).

## Usage

```lua
local R = fakeredis.new()
R:set("foo", "bar")
local foo = R:get("bar")
```

See [redis-lua](https://github.com/nrk/redis-lua) for more.

## Design

fakeredis tries to keep its interface compatible with redis-lua but is not fully compatible, see supported.txt for supported commands.

fakeredis does not support multiple DBs. You should probably not use them anyway. If you really need SELECT in tests it is easy to write a small wrapper that uses multiple instances of fakeredis.

## Copyright

Copyright (c) 2012-2013 <NAME>
{'fraction_non_alphanumeric': 0.10337552742616034, 'fraction_numerical': 0.008438818565400843, 'mean_word_length': 4.422857142857143, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 3, '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': '6971490', 'n_tokens_mistral': 314, 'n_tokens_neox': 291, 'n_words': 114}