o
    `f	                     @   s2   d dl mZmZ G dd dZG dd deZdS )    )JSONDecoderJSONEncoderc                   @   sf   e Zd ZdZe e fddZdddZdd Zd	d
 Z	dd Z
dd Zdd Zdd ZdddZdS )RedisModuleCommandszoThis class contains the wrapper functions to bring supported redis
    modules into the command namespace.
    c                 C   s   ddl m} || ||d}|S )z<Access the json namespace, providing support for redis json.   )JSON)clientencoderdecoder)jsonr   )selfr   r	   r   jj r   T/home/ubuntu/webapp/venv/lib/python3.10/site-packages/redis/commands/redismodules.pyr
   	   s   zRedisModuleCommands.jsonidxc                 C      ddl m} || |d}|S )@Access the search namespace, providing support for redis search.r   )Searchr   
index_name)searchr   )r   r   r   sr   r   r   ft      zRedisModuleCommands.ftc                 C      ddl m} || d}|S )z^Access the timeseries namespace, providing support for
        redis timeseries data.
        r   )
TimeSeriesr   )
timeseriesr   )r   r   r   r   r   r   ts   s   
zRedisModuleCommands.tsc                 C   r   )Access the bloom namespace.r   )BFBloomr   )bfr   )r   r   r    r   r   r   r    #      
zRedisModuleCommands.bfc                 C   r   )r   r   )CFBloomr   )r    r"   )r   r"   cfr   r   r   r#   +   r!   zRedisModuleCommands.cfc                 C   r   )r   r   )CMSBloomr   )r    r$   )r   r$   cmsr   r   r   r%   3   r!   zRedisModuleCommands.cmsc                 C   r   )r   r   )	TOPKBloomr   )r    r&   )r   r&   topkr   r   r   r'   ;   r!   zRedisModuleCommands.topkc                 C   r   )r   r   )TDigestBloomr   )r    r(   )r   r(   tdigestr   r   r   r)   C   r!   zRedisModuleCommands.tdigestc                 C   r   )TAccess the graph namespace, providing support for
        redis graph data.
        r   )Graphr   name)graphr+   )r   r   r+   gr   r   r   r.   K      zRedisModuleCommands.graphNr   )__name__
__module____qualname____doc__r   r   r
   r   r   r    r#   r%   r'   r)   r.   r   r   r   r   r      s    

r   c                   @   s    e Zd ZdddZdddZdS )AsyncRedisModuleCommandsr   c                 C   r   )r   r   )AsyncSearchr   )r   r7   )r   r   r7   r   r   r   r   r   W   r   zAsyncRedisModuleCommands.ftc                 C   r   )r*   r   )
AsyncGraphr,   )r.   r8   )r   r   r8   r/   r   r   r   r.   _   r0   zAsyncRedisModuleCommands.graphNr1   )r2   r3   r4   r   r.   r   r   r   r   r6   V   s    
r6   N)r
   r   r   r   r6   r   r   r   r   <module>   s    R