redis-dict 1.6.0__tar.gz → 2.0.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.1
2
+ Name: redis dict
3
+ Version: 2.0.0
4
+ Summary: Dictionary with Redis as storage backend
5
+ Home-page: https://github.com/Attumm/redisdict
6
+ Author: Melvin Bijman
7
+ Author-email: bijman.m.m@gmail.com
8
+ License: MIT
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Database
12
+ Classifier: Topic :: System :: Distributed Computing
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.3
16
+ Classifier: Programming Language :: Python :: 3.4
17
+ Classifier: Programming Language :: Python :: 3.5
18
+ Classifier: Programming Language :: Python :: 3.6
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+
23
+ # Redis-dict
24
+ [![Build Status](https://travis-ci.com/Attumm/redis-dict.svg?branch=main)](https://travis-ci.com/Attumm/redis-dict)
25
+ [![Downloads](https://pepy.tech/badge/redis-dict)](https://pepy.tech/project/redis-dict)
26
+
27
+ RedisDict is a Python library that allows you to interact with Redis as if it were a Python dictionary. It provides a simple, convenient, and user-friendly interface for managing key-value pairs in Redis. The library is designed to work seamlessly with different data types such as strings, integers, floats, booleans, None, lists, and dictionaries. It also offers additional utility functions and features for more complex use cases.
28
+
29
+ RedisDict was developed to address the challenges associated with handling extremely large datasets, which often exceed the capacity of local memory. This package offers a powerful and efficient solution for managing vast amounts of data by leveraging the capabilities of Redis and providing a familiar Python dictionary-like interface for seamless integration into your projects.
30
+
31
+
32
+ RedisDict stores data in Redis using key-value pairs, adhering to [Redis best practices](https://redislabs.com/redis-best-practices/data-storage-patterns/) for data storage patterns. This design not only ensures optimal performance and reliability but also enables interoperability with non-Python programs, granting them seamless access to the data stored in Redis.
33
+
34
+ ## Example
35
+ Redis is an exceptionally fast database when used appropriately. RedisDict leverages Redis for efficient key-value storage, enabling high-performance data management.
36
+
37
+ ```python
38
+ >>> from redis_dict import RedisDict
39
+ >>> dic = RedisDict(namespace='bar')
40
+ >>> 'foo' in dic
41
+ False
42
+ >>> dic['foo'] = 42
43
+ >>> dic['foo']
44
+ 42
45
+ >>> 'foo' in dic
46
+ True
47
+ >>> dic["baz"] = "a string"
48
+ >>> print(dic)
49
+ {'foo': 42, 'baz': 'a string'}
50
+
51
+ ```
52
+ In Redis our example looks like this.
53
+ ```
54
+ 127.0.0.1:6379> KEYS "*"
55
+ 1) "bar:foo"
56
+ 2) "bar:baz"
57
+ ```
58
+
59
+ ## Features
60
+
61
+ * Dictionary-like interface: Use familiar Python dictionary syntax to interact with Redis.
62
+ * Data Type Support: Comprehensive support for various data types, including strings, integers, floats, booleans, lists, dictionaries, sets, and tuples.
63
+ * Pipelining support: Use pipelines for batch operations to improve performance.
64
+ * Expiration support: Set expiration times for keys using context managers.
65
+ * Efficiency and Scalability: RedisDict is designed for use with large datasets and is optimized for efficiency. It retrieves only the data needed for a particular operation, ensuring efficient memory usage and fast performance.
66
+ * Namespace Management: Provides simple and efficient namespace handling to help organize and manage data in Redis, streamlining data access and manipulation.
67
+ * Distributed Computing: With its ability to seamlessly connect to other instances or servers with access to the same Redis instance, RedisDict enables easy distributed computing.
68
+ * Multi-get and multi-delete: Perform batch operations for getting and deleting multiple keys at once.
69
+ * Custom data types: Add custom types and transformations to suit your specific needs.
70
+
71
+ #### Caveats and Experimental Support
72
+
73
+ Please note that the following data types have experimental support in RedisDict:
74
+ * List
75
+ * Tuple
76
+ * Set
77
+ * Dictionary
78
+
79
+ These data types are supported through JSON serialization, which means that if your lists or dictionaries can be serialized using JSON, this feature should work as expected. However, this may not be the optimal solution for all use cases. As such, use these features at your discretion and consider potential limitations.
80
+
81
+ If you encounter a need for additional support or improvements for these or other reference types, please feel free to open an issue on the GitHub repository. Your feedback and contributions are greatly appreciated.
82
+
83
+ ### Distributed computing
84
+ You can use RedisDict for distributed computing by starting multiple RedisDict instances on different servers or instances that have access to the same Redis instance:
85
+ ```python
86
+ # On server 1
87
+ r = RedisDict(namespace="example", **redis_config)
88
+ r["foo"] = "bar"
89
+
90
+
91
+ # On server 2
92
+ r1 = RedisDict(namespace="example", **redis_config)
93
+ print(r1["foo"])
94
+ "bar"
95
+
96
+ ```
97
+
98
+ ## Advance features examples
99
+
100
+ #### Expiration
101
+
102
+ Redis provides a valuable feature that enables keys to expire. RedisDict supports this feature in the following ways:
103
+ 1. Set a default expiration time when creating a RedisDict instance:
104
+ ```python
105
+ r_dic = RedisDict(namespace='app_name', expire=10)
106
+ ```
107
+ In this example, the keys will have a default expiration time of 10 seconds.
108
+
109
+ 2. Temporarily set the default expiration time within the scope using a context manager:
110
+ ```python
111
+ seconds = 60
112
+ with r_dic.expire_at(seconds):
113
+ r_dic['gone_in_sixty_seconds'] = 'foo'
114
+ ```
115
+ In this example, the key 'gone_in_sixty_seconds' will expire after 60 seconds. The default expiration time for other keys outside the context manager remains unchanged.
116
+
117
+ Please note that the default expiration time is set to None, which indicates that the keys will not expire unless explicitly specified.
118
+
119
+ #### Batching
120
+ Efficiently batch your requests using the Pipeline feature, which can be easily utilized with a context manager.
121
+
122
+ For example, let's store the first ten items of the Fibonacci sequence using a single round trip to Redis:
123
+ [example](https://github.com/Attumm/redis-dict/blob/main/assert_test.py#L1) larger script using pipelining with batching
124
+
125
+ ```python
126
+ def fib(n):
127
+ a, b = 0, 1
128
+ for _ in range(n):
129
+ yield a
130
+ a, b = (a+b), a
131
+
132
+ with r_dic.pipeline():
133
+ for index, item in enumerate(fib(10)):
134
+ r_dic[str(index)] = item
135
+ ```
136
+
137
+ By employing the pipeline context manager, you can reduce network overhead and improve the performance of your application when executing multiple Redis operations in a single batch.
138
+
139
+ ### Namespaces
140
+ RedisDict employs namespaces by default, providing an organized and efficient way to manage data across multiple projects. By using a dedicated RedisDict instance for each project, you can easily identify which data belongs to which application when inspecting Redis directly.
141
+
142
+ This approach also minimizes the risk of key collisions between different applications, preventing hard-to-debug issues. By leveraging namespaces, RedisDict ensures a cleaner and more maintainable data management experience for developers working on multiple projects.
143
+
144
+ ### Additional Examples
145
+ For more advanced examples of RedisDict, please refer to the test files in the repository. All features and functionalities are thoroughly tested in either[ `assert_test.py` (here)](https://github.com/Attumm/redis-dict/blob/main/assert_test.py#L1) or in the [unit tests (here)](https://github.com/Attumm/redis-dict/blob/main/tests.py#L1).
146
+ The test can be used as starting point for new projects
147
+
148
+ ### Tests
149
+
150
+ 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
151
+
152
+ ## Installation
153
+ ```sh
154
+ pip install redis-dict
155
+ ```
156
+
157
+ ### Note
158
+ Please be aware that this project is currently being utilized by various organizations in their production environments. If you have any questions or concerns, feel free to raise issues
159
+
160
+
161
+
162
+ ### Note This project only uses redis as dependency
@@ -0,0 +1,140 @@
1
+ # Redis-dict
2
+ [![Build Status](https://travis-ci.com/Attumm/redis-dict.svg?branch=main)](https://travis-ci.com/Attumm/redis-dict)
3
+ [![Downloads](https://pepy.tech/badge/redis-dict)](https://pepy.tech/project/redis-dict)
4
+
5
+ RedisDict is a Python library that allows you to interact with Redis as if it were a Python dictionary. It provides a simple, convenient, and user-friendly interface for managing key-value pairs in Redis. The library is designed to work seamlessly with different data types such as strings, integers, floats, booleans, None, lists, and dictionaries. It also offers additional utility functions and features for more complex use cases.
6
+
7
+ RedisDict was developed to address the challenges associated with handling extremely large datasets, which often exceed the capacity of local memory. This package offers a powerful and efficient solution for managing vast amounts of data by leveraging the capabilities of Redis and providing a familiar Python dictionary-like interface for seamless integration into your projects.
8
+
9
+
10
+ RedisDict stores data in Redis using key-value pairs, adhering to [Redis best practices](https://redislabs.com/redis-best-practices/data-storage-patterns/) for data storage patterns. This design not only ensures optimal performance and reliability but also enables interoperability with non-Python programs, granting them seamless access to the data stored in Redis.
11
+
12
+ ## Example
13
+ Redis is an exceptionally fast database when used appropriately. RedisDict leverages Redis for efficient key-value storage, enabling high-performance data management.
14
+
15
+ ```python
16
+ >>> from redis_dict import RedisDict
17
+ >>> dic = RedisDict(namespace='bar')
18
+ >>> 'foo' in dic
19
+ False
20
+ >>> dic['foo'] = 42
21
+ >>> dic['foo']
22
+ 42
23
+ >>> 'foo' in dic
24
+ True
25
+ >>> dic["baz"] = "a string"
26
+ >>> print(dic)
27
+ {'foo': 42, 'baz': 'a string'}
28
+
29
+ ```
30
+ In Redis our example looks like this.
31
+ ```
32
+ 127.0.0.1:6379> KEYS "*"
33
+ 1) "bar:foo"
34
+ 2) "bar:baz"
35
+ ```
36
+
37
+ ## Features
38
+
39
+ * Dictionary-like interface: Use familiar Python dictionary syntax to interact with Redis.
40
+ * Data Type Support: Comprehensive support for various data types, including strings, integers, floats, booleans, lists, dictionaries, sets, and tuples.
41
+ * Pipelining support: Use pipelines for batch operations to improve performance.
42
+ * Expiration support: Set expiration times for keys using context managers.
43
+ * Efficiency and Scalability: RedisDict is designed for use with large datasets and is optimized for efficiency. It retrieves only the data needed for a particular operation, ensuring efficient memory usage and fast performance.
44
+ * Namespace Management: Provides simple and efficient namespace handling to help organize and manage data in Redis, streamlining data access and manipulation.
45
+ * Distributed Computing: With its ability to seamlessly connect to other instances or servers with access to the same Redis instance, RedisDict enables easy distributed computing.
46
+ * Multi-get and multi-delete: Perform batch operations for getting and deleting multiple keys at once.
47
+ * Custom data types: Add custom types and transformations to suit your specific needs.
48
+
49
+ #### Caveats and Experimental Support
50
+
51
+ Please note that the following data types have experimental support in RedisDict:
52
+ * List
53
+ * Tuple
54
+ * Set
55
+ * Dictionary
56
+
57
+ These data types are supported through JSON serialization, which means that if your lists or dictionaries can be serialized using JSON, this feature should work as expected. However, this may not be the optimal solution for all use cases. As such, use these features at your discretion and consider potential limitations.
58
+
59
+ If you encounter a need for additional support or improvements for these or other reference types, please feel free to open an issue on the GitHub repository. Your feedback and contributions are greatly appreciated.
60
+
61
+ ### Distributed computing
62
+ You can use RedisDict for distributed computing by starting multiple RedisDict instances on different servers or instances that have access to the same Redis instance:
63
+ ```python
64
+ # On server 1
65
+ r = RedisDict(namespace="example", **redis_config)
66
+ r["foo"] = "bar"
67
+
68
+
69
+ # On server 2
70
+ r1 = RedisDict(namespace="example", **redis_config)
71
+ print(r1["foo"])
72
+ "bar"
73
+
74
+ ```
75
+
76
+ ## Advance features examples
77
+
78
+ #### Expiration
79
+
80
+ Redis provides a valuable feature that enables keys to expire. RedisDict supports this feature in the following ways:
81
+ 1. Set a default expiration time when creating a RedisDict instance:
82
+ ```python
83
+ r_dic = RedisDict(namespace='app_name', expire=10)
84
+ ```
85
+ In this example, the keys will have a default expiration time of 10 seconds.
86
+
87
+ 2. Temporarily set the default expiration time within the scope using a context manager:
88
+ ```python
89
+ seconds = 60
90
+ with r_dic.expire_at(seconds):
91
+ r_dic['gone_in_sixty_seconds'] = 'foo'
92
+ ```
93
+ In this example, the key 'gone_in_sixty_seconds' will expire after 60 seconds. The default expiration time for other keys outside the context manager remains unchanged.
94
+
95
+ Please note that the default expiration time is set to None, which indicates that the keys will not expire unless explicitly specified.
96
+
97
+ #### Batching
98
+ Efficiently batch your requests using the Pipeline feature, which can be easily utilized with a context manager.
99
+
100
+ For example, let's store the first ten items of the Fibonacci sequence using a single round trip to Redis:
101
+ [example](https://github.com/Attumm/redis-dict/blob/main/assert_test.py#L1) larger script using pipelining with batching
102
+
103
+ ```python
104
+ def fib(n):
105
+ a, b = 0, 1
106
+ for _ in range(n):
107
+ yield a
108
+ a, b = (a+b), a
109
+
110
+ with r_dic.pipeline():
111
+ for index, item in enumerate(fib(10)):
112
+ r_dic[str(index)] = item
113
+ ```
114
+
115
+ By employing the pipeline context manager, you can reduce network overhead and improve the performance of your application when executing multiple Redis operations in a single batch.
116
+
117
+ ### Namespaces
118
+ RedisDict employs namespaces by default, providing an organized and efficient way to manage data across multiple projects. By using a dedicated RedisDict instance for each project, you can easily identify which data belongs to which application when inspecting Redis directly.
119
+
120
+ This approach also minimizes the risk of key collisions between different applications, preventing hard-to-debug issues. By leveraging namespaces, RedisDict ensures a cleaner and more maintainable data management experience for developers working on multiple projects.
121
+
122
+ ### Additional Examples
123
+ For more advanced examples of RedisDict, please refer to the test files in the repository. All features and functionalities are thoroughly tested in either[ `assert_test.py` (here)](https://github.com/Attumm/redis-dict/blob/main/assert_test.py#L1) or in the [unit tests (here)](https://github.com/Attumm/redis-dict/blob/main/tests.py#L1).
124
+ The test can be used as starting point for new projects
125
+
126
+ ### Tests
127
+
128
+ 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
129
+
130
+ ## Installation
131
+ ```sh
132
+ pip install redis-dict
133
+ ```
134
+
135
+ ### Note
136
+ Please be aware that this project is currently being utilized by various organizations in their production environments. If you have any questions or concerns, feel free to raise issues
137
+
138
+
139
+
140
+ ### Note This project only uses redis as dependency
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.1
2
+ Name: redis-dict
3
+ Version: 2.0.0
4
+ Summary: Dictionary with Redis as storage backend
5
+ Home-page: https://github.com/Attumm/redisdict
6
+ Author: Melvin Bijman
7
+ Author-email: bijman.m.m@gmail.com
8
+ License: MIT
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Database
12
+ Classifier: Topic :: System :: Distributed Computing
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.3
16
+ Classifier: Programming Language :: Python :: 3.4
17
+ Classifier: Programming Language :: Python :: 3.5
18
+ Classifier: Programming Language :: Python :: 3.6
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+
23
+ # Redis-dict
24
+ [![Build Status](https://travis-ci.com/Attumm/redis-dict.svg?branch=main)](https://travis-ci.com/Attumm/redis-dict)
25
+ [![Downloads](https://pepy.tech/badge/redis-dict)](https://pepy.tech/project/redis-dict)
26
+
27
+ RedisDict is a Python library that allows you to interact with Redis as if it were a Python dictionary. It provides a simple, convenient, and user-friendly interface for managing key-value pairs in Redis. The library is designed to work seamlessly with different data types such as strings, integers, floats, booleans, None, lists, and dictionaries. It also offers additional utility functions and features for more complex use cases.
28
+
29
+ RedisDict was developed to address the challenges associated with handling extremely large datasets, which often exceed the capacity of local memory. This package offers a powerful and efficient solution for managing vast amounts of data by leveraging the capabilities of Redis and providing a familiar Python dictionary-like interface for seamless integration into your projects.
30
+
31
+
32
+ RedisDict stores data in Redis using key-value pairs, adhering to [Redis best practices](https://redislabs.com/redis-best-practices/data-storage-patterns/) for data storage patterns. This design not only ensures optimal performance and reliability but also enables interoperability with non-Python programs, granting them seamless access to the data stored in Redis.
33
+
34
+ ## Example
35
+ Redis is an exceptionally fast database when used appropriately. RedisDict leverages Redis for efficient key-value storage, enabling high-performance data management.
36
+
37
+ ```python
38
+ >>> from redis_dict import RedisDict
39
+ >>> dic = RedisDict(namespace='bar')
40
+ >>> 'foo' in dic
41
+ False
42
+ >>> dic['foo'] = 42
43
+ >>> dic['foo']
44
+ 42
45
+ >>> 'foo' in dic
46
+ True
47
+ >>> dic["baz"] = "a string"
48
+ >>> print(dic)
49
+ {'foo': 42, 'baz': 'a string'}
50
+
51
+ ```
52
+ In Redis our example looks like this.
53
+ ```
54
+ 127.0.0.1:6379> KEYS "*"
55
+ 1) "bar:foo"
56
+ 2) "bar:baz"
57
+ ```
58
+
59
+ ## Features
60
+
61
+ * Dictionary-like interface: Use familiar Python dictionary syntax to interact with Redis.
62
+ * Data Type Support: Comprehensive support for various data types, including strings, integers, floats, booleans, lists, dictionaries, sets, and tuples.
63
+ * Pipelining support: Use pipelines for batch operations to improve performance.
64
+ * Expiration support: Set expiration times for keys using context managers.
65
+ * Efficiency and Scalability: RedisDict is designed for use with large datasets and is optimized for efficiency. It retrieves only the data needed for a particular operation, ensuring efficient memory usage and fast performance.
66
+ * Namespace Management: Provides simple and efficient namespace handling to help organize and manage data in Redis, streamlining data access and manipulation.
67
+ * Distributed Computing: With its ability to seamlessly connect to other instances or servers with access to the same Redis instance, RedisDict enables easy distributed computing.
68
+ * Multi-get and multi-delete: Perform batch operations for getting and deleting multiple keys at once.
69
+ * Custom data types: Add custom types and transformations to suit your specific needs.
70
+
71
+ #### Caveats and Experimental Support
72
+
73
+ Please note that the following data types have experimental support in RedisDict:
74
+ * List
75
+ * Tuple
76
+ * Set
77
+ * Dictionary
78
+
79
+ These data types are supported through JSON serialization, which means that if your lists or dictionaries can be serialized using JSON, this feature should work as expected. However, this may not be the optimal solution for all use cases. As such, use these features at your discretion and consider potential limitations.
80
+
81
+ If you encounter a need for additional support or improvements for these or other reference types, please feel free to open an issue on the GitHub repository. Your feedback and contributions are greatly appreciated.
82
+
83
+ ### Distributed computing
84
+ You can use RedisDict for distributed computing by starting multiple RedisDict instances on different servers or instances that have access to the same Redis instance:
85
+ ```python
86
+ # On server 1
87
+ r = RedisDict(namespace="example", **redis_config)
88
+ r["foo"] = "bar"
89
+
90
+
91
+ # On server 2
92
+ r1 = RedisDict(namespace="example", **redis_config)
93
+ print(r1["foo"])
94
+ "bar"
95
+
96
+ ```
97
+
98
+ ## Advance features examples
99
+
100
+ #### Expiration
101
+
102
+ Redis provides a valuable feature that enables keys to expire. RedisDict supports this feature in the following ways:
103
+ 1. Set a default expiration time when creating a RedisDict instance:
104
+ ```python
105
+ r_dic = RedisDict(namespace='app_name', expire=10)
106
+ ```
107
+ In this example, the keys will have a default expiration time of 10 seconds.
108
+
109
+ 2. Temporarily set the default expiration time within the scope using a context manager:
110
+ ```python
111
+ seconds = 60
112
+ with r_dic.expire_at(seconds):
113
+ r_dic['gone_in_sixty_seconds'] = 'foo'
114
+ ```
115
+ In this example, the key 'gone_in_sixty_seconds' will expire after 60 seconds. The default expiration time for other keys outside the context manager remains unchanged.
116
+
117
+ Please note that the default expiration time is set to None, which indicates that the keys will not expire unless explicitly specified.
118
+
119
+ #### Batching
120
+ Efficiently batch your requests using the Pipeline feature, which can be easily utilized with a context manager.
121
+
122
+ For example, let's store the first ten items of the Fibonacci sequence using a single round trip to Redis:
123
+ [example](https://github.com/Attumm/redis-dict/blob/main/assert_test.py#L1) larger script using pipelining with batching
124
+
125
+ ```python
126
+ def fib(n):
127
+ a, b = 0, 1
128
+ for _ in range(n):
129
+ yield a
130
+ a, b = (a+b), a
131
+
132
+ with r_dic.pipeline():
133
+ for index, item in enumerate(fib(10)):
134
+ r_dic[str(index)] = item
135
+ ```
136
+
137
+ By employing the pipeline context manager, you can reduce network overhead and improve the performance of your application when executing multiple Redis operations in a single batch.
138
+
139
+ ### Namespaces
140
+ RedisDict employs namespaces by default, providing an organized and efficient way to manage data across multiple projects. By using a dedicated RedisDict instance for each project, you can easily identify which data belongs to which application when inspecting Redis directly.
141
+
142
+ This approach also minimizes the risk of key collisions between different applications, preventing hard-to-debug issues. By leveraging namespaces, RedisDict ensures a cleaner and more maintainable data management experience for developers working on multiple projects.
143
+
144
+ ### Additional Examples
145
+ For more advanced examples of RedisDict, please refer to the test files in the repository. All features and functionalities are thoroughly tested in either[ `assert_test.py` (here)](https://github.com/Attumm/redis-dict/blob/main/assert_test.py#L1) or in the [unit tests (here)](https://github.com/Attumm/redis-dict/blob/main/tests.py#L1).
146
+ The test can be used as starting point for new projects
147
+
148
+ ### Tests
149
+
150
+ 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
151
+
152
+ ## Installation
153
+ ```sh
154
+ pip install redis-dict
155
+ ```
156
+
157
+ ### Note
158
+ Please be aware that this project is currently being utilized by various organizations in their production environments. If you have any questions or concerns, feel free to raise issues
159
+
160
+
161
+
162
+ ### Note This project only uses redis as dependency