1
1
from json import JSONEncoder , JSONDecoder
2
- from redis .exceptions import ModuleError
3
2
4
3
5
4
class RedisModuleCommands :
@@ -10,10 +9,6 @@ class RedisModuleCommands:
10
9
def json (self , encoder = JSONEncoder (), decoder = JSONDecoder ()):
11
10
"""Access the json namespace, providing support for redis json.
12
11
"""
13
- if 'JSON.SET' not in self .__commands__ :
14
- raise ModuleError ("redisjson is not loaded in redis. "
15
- "For more information visit "
16
- "https://redisjson.io/" )
17
12
18
13
from .json import JSON
19
14
jj = JSON (
@@ -25,10 +20,6 @@ def json(self, encoder=JSONEncoder(), decoder=JSONDecoder()):
25
20
def ft (self , index_name = "idx" ):
26
21
"""Access the search namespace, providing support for redis search.
27
22
"""
28
- if 'FT.INFO' not in self .__commands__ :
29
- raise ModuleError ("redisearch is not loaded in redis. "
30
- "For more information visit "
31
- "https://redisearch.io/" )
32
23
33
24
from .search import Search
34
25
s = Search (client = self , index_name = index_name )
@@ -38,10 +29,6 @@ def ts(self):
38
29
"""Access the timeseries namespace, providing support for
39
30
redis timeseries data.
40
31
"""
41
- if 'TS.INFO' not in self .__commands__ :
42
- raise ModuleError ("reditimeseries is not loaded in redis. "
43
- "For more information visit "
44
- "https://redistimeseries.io/" )
45
32
46
33
from .timeseries import TimeSeries
47
34
s = TimeSeries (client = self )
0 commit comments