You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,11 @@ RedisDict is a Python library that offers a convenient and familiar interface fo
10
10
11
11
The library includes utility functions for more complex use cases such as caching, batching, and more. By leveraging Redis for efficient key-value storage, RedisDict enables high-performance data management, maintaining efficiency even with large datasets and Redis instances.
* Dictionary-like interface: Use familiar Python dictionary syntax to interact with Redis.
@@ -22,7 +27,7 @@ The library includes utility functions for more complex use cases such as cachin
22
27
* Custom data: types: Add custom types encoding/decoding to store your data types.
23
28
* Encryption: allows for storing data encrypted, while retaining the simple dictionary interface.
24
29
25
-
## Example
30
+
## Usage
26
31
27
32
```bash
28
33
pip install redis-dict
@@ -277,7 +282,7 @@ print(dic)
277
282
```
278
283
279
284
### Additional Examples
280
-
For more advanced examples of RedisDict, please refer to the unit-test files in the repository. All features and functionalities are thoroughly tested in [unit tests (here)](https://github.com/Attumm/redis-dict/blob/main/tests/unit/tests.py#L1) Or take a look at load test for batching [load test](https://github.com/Attumm/redis-dict/blob/main/tests/load/load_test.py#L1).
285
+
For more advanced examples of RedisDict, please refer to the unit-test files in the repository. All features and functionalities are thoroughly tested in [unit tests (here)](https://github.com/Attumm/redis-dict/blob/main/tests/unit/tests.py#L1) Or take a look at load test for batching [load test](https://github.com/Attumm/redis-dict/blob/main/tests/load/tests_load.py#L1).
281
286
The unit-tests can be as used as a starting point.
result = json.loads(encoded, cls=RedisDictJSONDecoder)
303
308
```
304
309
310
+
## Custom Types
305
311
### Extending RedisDict with Custom Types
306
312
307
313
RedisDict supports custom type serialization. Here's how to add a new type:
@@ -351,14 +357,22 @@ dic["3"] = "three"
351
357
assertlist(dic.keys()) == ["1", "2", "3"]
352
358
```
353
359
354
-
For more information on [extending types](https://github.com/Attumm/redis-dict/blob/main/tests/unit/extend_types_tests.py).
355
-
### Redis Encryption
360
+
For more information on [extending types](https://github.com/Attumm/redis-dict/blob/main/tests/unit/tests_extend_types.py).
361
+
362
+
## Security
363
+
364
+
Security is an important aspect of production projects. Redis-dict was developed within a strict compliance environment.
365
+
Best practice in Redis is to use passwords and network encryption through TLS. However, Redis-dict offers an additional feature by using extended types.
366
+
It is possible to store the values of keys encrypted. The values are encrypted with AES GCM, which is currently considered best practice for security.
367
+
368
+
### Storage Encryption
369
+
For storing data values encrypted can be achieved using encrypted values, more documentation on that later.
370
+
For now code example within this test file. [encrypted test](https://github.com/Attumm/redis-dict/blob/main/tests/unit/tests_encrypt.py).
371
+
372
+
### Encryption Network
356
373
Setup guide for configuring and utilizing encrypted Redis TLS for redis-dict.
For storing encrypted data values, it's possible to use extended types. Take a look at this [encrypted test](https://github.com/Attumm/redis-dict/blob/main/tests/unit/encrypt_tests.py).
361
-
362
376
### Tests
363
377
The RedisDict library includes a comprehensive suite of tests that ensure its correctness and resilience. The test suite covers various data types, edge cases, and error handling scenarios. It also employs the Hypothesis library for property-based testing, which provides fuzz testing to evaluate the implementation
0 commit comments