U
    d                     @   s   d dl mZmZmZmZmZ d dlmZ d dlm	Z	m
Z
 dZdZdZdZdZd	Zd
ZdZdZdZdZdZdZdZdZdZdZG dd dZdS )    )DictListOptionalTupleUnion)	DataError)KeyTNumberTS.ADDzTS.ALTERzTS.CREATERULEz	TS.CREATEz	TS.DECRBYzTS.DELETERULEzTS.DELzTS.GETz	TS.INCRBYzTS.INFOzTS.MADDzTS.MGETz	TS.MRANGEzTS.MREVRANGEzTS.QUERYINDEXzTS.RANGEzTS.REVRANGEc                   @   s  e Zd ZdZdjeee ee eee	e	f  ee ee	 dddZ
dkeee eee	e	f  ee ee	 ddd	Zdleeee	f eee ee eee	e	f  ee ee	 d
ddZeeeeee	f ef  dddZdmeeeeee	f  ee ee eee	e	f  ee dddZdneeeeee	f  ee ee eee	e	f  ee dddZeeedddZdoeee	eee dddZeedddZeeee	f eee	f ee ee	 ee eee  ee ee eeee	f  ee ee	 ee ddd Zdpeeee	f eee	f ee ee	 ee eee  ee ee eeee	f  ee ee	 ee dd"d#Zdqeeee	f eee	f ee ee	 ee eee  ee ee eeee	f  ee ee	 ee dd$d%Zee	 ee ee ee	 eee	f eee	f ee eee  ee ee ee	 ee	 eee	  eeee	f  ee ee	 ee d&d'd(Zdreee	f eee	f ee	 ee ee	 ee ee eee  ee ee ee	 ee	 eee	  eeee	f  ee ee	 ee d)d*d+Zdseee	f eee	f ee	 ee ee	 ee ee eee  ee ee ee	 ee	 eee	  eeee	f  ee ee	 ee d)d,d-Zdteee d.d/d0Zduee	 ee eee	  ee d1d2d3Zed4d5d6Zee	 d7d8d9Z e!ee	 ee d:d;d<Z"e!ee	 ee eee	  d=d>d?Z#e!ee	 ee	 ee	 d@dAdBZ$e!ee	 ee dCdDdEZ%e!ee	 eee	  dFdGdHZ&e!ee	 ee dIdJdKZ'e!ee	 ee dLdMdNZ(e!ee	 eeee	f  dOdPdQZ)e!ee	 ee	 ee dRdSdTZ*e!ee	 ee dUdVdWZ+e!ee	 ee	 ee	 dXdYdZZ,e!ee	 eee  d[d\d]Z-e!ee	 ee ee d^d_d`Z.e!ee	 ee dadbdcZ/e!ee	 ee	 dddedfZ0e!ee	 ee dgdhdiZ1dS )vTimeSeriesCommandszRedisTimeSeries Commands.NF)keyretention_msecsuncompressedlabels
chunk_sizeduplicate_policyc                 C   sT   |g}|  || | || | || | |t| | || | jtf| S )a  
        Create a new time-series.

        Args:

        key:
            time-series key
        retention_msecs:
            Maximum age for samples compared to highest reported timestamp (in milliseconds).
            If None or 0 is passed then  the series is not trimmed at all.
        uncompressed:
            Changes data storage from compressed (by default) to uncompressed
        labels:
            Set of label-value pairs that represent metadata labels of the key.
        chunk_size:
            Memory size, in bytes, allocated for each data chunk.
            Must be a multiple of 8 in the range [128 .. 1048576].
        duplicate_policy:
            Policy for handling multiple samples with identical timestamps.
            Can be one of:
            - 'block': an error will occur for any out of order sample.
            - 'first': ignore the new value.
            - 'last': override with latest value.
            - 'min': only override if the value is lower than the existing value.
            - 'max': only override if the value is higher than the existing value.

        For more information: https://redis.io/commands/ts.create/
        )_append_retention_append_uncompressed_append_chunk_size_append_duplicate_policy
CREATE_CMD_append_labelsexecute_command)selfr   r   r   r   r   r   params r   F/tmp/pip-unpacked-wheel-f5h5_hbx/redis/commands/timeseries/commands.pycreate   s    %zTimeSeriesCommands.create)r   r   r   r   r   c                 C   sH   |g}|  || | || | |t| | || | jtf| S )az  
        Update the retention, chunk size, duplicate policy, and labels of an existing
        time series.

        Args:

        key:
            time-series key
        retention_msecs:
            Maximum retention period, compared to maximal existing timestamp (in milliseconds).
            If None or 0 is passed then  the series is not trimmed at all.
        labels:
            Set of label-value pairs that represent metadata labels of the key.
        chunk_size:
            Memory size, in bytes, allocated for each data chunk.
            Must be a multiple of 8 in the range [128 .. 1048576].
        duplicate_policy:
            Policy for handling multiple samples with identical timestamps.
            Can be one of:
            - 'block': an error will occur for any out of order sample.
            - 'first': ignore the new value.
            - 'last': override with latest value.
            - 'min': only override if the value is lower than the existing value.
            - 'max': only override if the value is higher than the existing value.

        For more information: https://redis.io/commands/ts.alter/
        )r   r   r   	ALTER_CMDr   r   )r   r   r   r   r   r   r   r   r   r   alterJ   s    #zTimeSeriesCommands.alter)r   	timestampvaluer   r   r   r   r   c	           
      C   sX   |||g}	|  |	| | |	| | |	| | |	t| | |	| | jtf|	 S )aj  
        Append (or create and append) a new sample to a time series.

        Args:

        key:
            time-series key
        timestamp:
            Timestamp of the sample. * can be used for automatic timestamp (using the system clock).
        value:
            Numeric data value of the sample
        retention_msecs:
            Maximum retention period, compared to maximal existing timestamp (in milliseconds).
            If None or 0 is passed then  the series is not trimmed at all.
        uncompressed:
            Changes data storage from compressed (by default) to uncompressed
        labels:
            Set of label-value pairs that represent metadata labels of the key.
        chunk_size:
            Memory size, in bytes, allocated for each data chunk.
            Must be a multiple of 8 in the range [128 .. 1048576].
        duplicate_policy:
            Policy for handling multiple samples with identical timestamps.
            Can be one of:
            - 'block': an error will occur for any out of order sample.
            - 'first': ignore the new value.
            - 'last': override with latest value.
            - 'min': only override if the value is lower than the existing value.
            - 'max': only override if the value is higher than the existing value.

        For more information: https://redis.io/commands/ts.add/
        )r   r   r   r   ADD_CMDr   r   )
r   r   r    r!   r   r   r   r   r   r   r   r   r   addu   s    +
zTimeSeriesCommands.add)
ktv_tuplesc                 C   s(   g }|D ]}| | q| jtf| S )a-  
        Append (or create and append) a new `value` to series
        `key` with `timestamp`.
        Expects a list of `tuples` as (`key`,`timestamp`, `value`).
        Return value is an array with timestamps of insertions.

        For more information: https://redis.io/commands/ts.madd/
        )extendr   MADD_CMD)r   r$   r   Zktvr   r   r   madd   s    	zTimeSeriesCommands.madd)r   r!   r    r   r   r   r   c           	      C   sT   ||g}|  || | || | || | || | || | jtf| S )a  
        Increment (or create an time-series and increment) the latest sample's of a series.
        This command can be used as a counter or gauge that automatically gets history as a time series.

        Args:

        key:
            time-series key
        value:
            Numeric data value of the sample
        timestamp:
            Timestamp of the sample. * can be used for automatic timestamp (using the system clock).
        retention_msecs:
            Maximum age for samples compared to last event time (in milliseconds).
            If None or 0 is passed then  the series is not trimmed at all.
        uncompressed:
            Changes data storage from compressed (by default) to uncompressed
        labels:
            Set of label-value pairs that represent metadata labels of the key.
        chunk_size:
            Memory size, in bytes, allocated for each data chunk.

        For more information: https://redis.io/commands/ts.incrby/
        )_append_timestampr   r   r   r   r   
INCRBY_CMD	r   r   r!   r    r   r   r   r   r   r   r   r   incrby   s    "zTimeSeriesCommands.incrbyc           	      C   sT   ||g}|  || | || | || | || | || | jtf| S )a  
        Decrement (or create an time-series and decrement) the latest sample's of a series.
        This command can be used as a counter or gauge that automatically gets history as a time series.

        Args:

        key:
            time-series key
        value:
            Numeric data value of the sample
        timestamp:
            Timestamp of the sample. * can be used for automatic timestamp (using the system clock).
        retention_msecs:
            Maximum age for samples compared to last event time (in milliseconds).
            If None or 0 is passed then  the series is not trimmed at all.
        uncompressed:
            Changes data storage from compressed (by default) to uncompressed
        labels:
            Set of label-value pairs that represent metadata labels of the key.
        chunk_size:
            Memory size, in bytes, allocated for each data chunk.

        For more information: https://redis.io/commands/ts.decrby/
        )r(   r   r   r   r   r   
DECRBY_CMDr*   r   r   r   decrby   s    "zTimeSeriesCommands.decrby)r   	from_timeto_timec                 C   s   |  t|||S )aY  
        Delete all samples between two timestamps for a given time series.

        Args:

        key:
            time-series key.
        from_time:
            Start timestamp for the range deletion.
        to_time:
            End timestamp for the range deletion.

        For more information: https://redis.io/commands/ts.del/
        )r   DEL_CMD)r   r   r.   r/   r   r   r   delete  s    zTimeSeriesCommands.delete)
source_keydest_keyaggregation_typebucket_size_msecalign_timestampc                 C   s8   ||g}|  ||| |dk	r(|| | jtf| S )a  
        Create a compaction rule from values added to `source_key` into `dest_key`.

        Args:

        source_key:
            Key name for source time series
        dest_key:
            Key name for destination (compacted) time series
        aggregation_type:
            Aggregation type: One of the following:
            [`avg`, `sum`, `min`, `max`, `range`, `count`, `first`, `last`, `std.p`,
            `std.s`, `var.p`, `var.s`, `twa`]
        bucket_size_msec:
            Duration of each bucket, in milliseconds
        align_timestamp:
            Assure that there is a bucket that starts at exactly align_timestamp and
            align all other buckets accordingly.

        For more information: https://redis.io/commands/ts.createrule/
        N)_append_aggregationappendr   CREATERULE_CMD)r   r2   r3   r4   r5   r6   r   r   r   r   
createrule  s
    
zTimeSeriesCommands.createrule)r2   r3   c                 C   s   |  t||S )z
        Delete a compaction rule from `source_key` to `dest_key`..

        For more information: https://redis.io/commands/ts.deleterule/
        )r   DELETERULE_CMD)r   r2   r3   r   r   r   
deleteruleC  s    zTimeSeriesCommands.deleterule)r   r.   r/   countr4   r5   filter_by_tsfilter_by_min_valuefilter_by_max_valuealignlatestbucket_timestampemptyc                 C   sr   |||g}|  || | || | |||	 | || | ||
 | ||| | || | || |S )z*Create TS.RANGE and TS.REVRANGE arguments.)_append_latest_append_filer_by_ts_append_filer_by_value_append_count_append_alignr7   _append_bucket_timestamp_append_emptyr   r   r.   r/   r=   r4   r5   r>   r?   r@   rA   rB   rC   rD   r   r   r   r   Z__range_paramsK  s    
z!TimeSeriesCommands.__range_paramsr   c                 C   s2   |  |||||||||	|
|||}| jtf| S )a  
        Query a range in forward direction for a specific time-serie.

        Args:

        key:
            Key name for timeseries.
        from_time:
            Start timestamp for the range query. - can be used to express the minimum possible timestamp (0).
        to_time:
            End timestamp for range query, + can be used to express the maximum possible timestamp.
        count:
            Limits the number of returned samples.
        aggregation_type:
            Optional aggregation type. Can be one of [`avg`, `sum`, `min`, `max`,
            `range`, `count`, `first`, `last`, `std.p`, `std.s`, `var.p`, `var.s`, `twa`]
        bucket_size_msec:
            Time bucket for aggregation in milliseconds.
        filter_by_ts:
            List of timestamps to filter the result by specific timestamps.
        filter_by_min_value:
            Filter result by minimum value (must mention also filter by_max_value).
        filter_by_max_value:
            Filter result by maximum value (must mention also filter by_min_value).
        align:
            Timestamp for alignment control for aggregation.
        latest:
            Used when a time series is a compaction, reports the compacted value of the
            latest possibly partial bucket
        bucket_timestamp:
            Controls how bucket timestamps are reported. Can be one of [`-`, `low`, `+`,
            `high`, `~`, `mid`].
        empty:
            Reports aggregations for empty buckets.

        For more information: https://redis.io/commands/ts.range/
        )!_TimeSeriesCommands__range_paramsr   	RANGE_CMDrL   r   r   r   rangeh  s     5zTimeSeriesCommands.rangec                 C   s2   |  |||||||||	|
|||}| jtf| S )as  
        Query a range in reverse direction for a specific time-series.

        **Note**: This command is only available since RedisTimeSeries >= v1.4

        Args:

        key:
            Key name for timeseries.
        from_time:
            Start timestamp for the range query. - can be used to express the minimum possible timestamp (0).
        to_time:
            End timestamp for range query, + can be used to express the maximum possible timestamp.
        count:
            Limits the number of returned samples.
        aggregation_type:
            Optional aggregation type. Can be one of [`avg`, `sum`, `min`, `max`,
            `range`, `count`, `first`, `last`, `std.p`, `std.s`, `var.p`, `var.s`, `twa`]
        bucket_size_msec:
            Time bucket for aggregation in milliseconds.
        filter_by_ts:
            List of timestamps to filter the result by specific timestamps.
        filter_by_min_value:
            Filter result by minimum value (must mention also filter_by_max_value).
        filter_by_max_value:
            Filter result by maximum value (must mention also filter_by_min_value).
        align:
            Timestamp for alignment control for aggregation.
        latest:
            Used when a time series is a compaction, reports the compacted value of the
            latest possibly partial bucket
        bucket_timestamp:
            Controls how bucket timestamps are reported. Can be one of [`-`, `low`, `+`,
            `high`, `~`, `mid`].
        empty:
            Reports aggregations for empty buckets.

        For more information: https://redis.io/commands/ts.revrange/
        )rM   r   REVRANGE_CMDrL   r   r   r   revrange  s     7zTimeSeriesCommands.revrange)r4   r5   r=   filtersr.   r/   with_labelsr>   r?   r@   groupbyreduceselect_labelsrA   rB   rC   rD   c                 C   s   ||g}|  || | || | ||	|
 | ||| | || | || | ||| | || | || |	dg ||7 }| 
||| |S )z,Create TS.MRANGE and TS.MREVRANGE arguments.FILTER)rE   rF   rG   _append_with_labelsrH   rI   r7   rJ   rK   r%   _append_groupby_reduce)r   r4   r5   r=   rR   r.   r/   rS   r>   r?   r@   rT   rU   rV   rA   rB   rC   rD   r   r   r   r   Z__mrange_params  s    z"TimeSeriesCommands.__mrange_params)r.   r/   rR   r=   r4   r5   rS   r>   r?   r@   rT   rU   rV   rA   rB   rC   rD   c                 C   s:   |  |||||||||	|
|||||||}| jtf| S )a<  
        Query a range across multiple time-series by filters in forward direction.

        Args:

        from_time:
            Start timestamp for the range query. `-` can be used to express the minimum possible timestamp (0).
        to_time:
            End timestamp for range query, `+` can be used to express the maximum possible timestamp.
        filters:
            filter to match the time-series labels.
        count:
            Limits the number of returned samples.
        aggregation_type:
            Optional aggregation type. Can be one of [`avg`, `sum`, `min`, `max`,
            `range`, `count`, `first`, `last`, `std.p`, `std.s`, `var.p`, `var.s`, `twa`]
        bucket_size_msec:
            Time bucket for aggregation in milliseconds.
        with_labels:
            Include in the reply all label-value pairs representing metadata labels of the time series.
        filter_by_ts:
            List of timestamps to filter the result by specific timestamps.
        filter_by_min_value:
            Filter result by minimum value (must mention also filter_by_max_value).
        filter_by_max_value:
            Filter result by maximum value (must mention also filter_by_min_value).
        groupby:
            Grouping by fields the results (must mention also reduce).
        reduce:
            Applying reducer functions on each group. Can be one of [`avg` `sum`, `min`,
            `max`, `range`, `count`, `std.p`, `std.s`, `var.p`, `var.s`].
        select_labels:
            Include in the reply only a subset of the key-value pair labels of a series.
        align:
            Timestamp for alignment control for aggregation.
        latest:
            Used when a time series is a compaction, reports the compacted
            value of the latest possibly partial bucket
        bucket_timestamp:
            Controls how bucket timestamps are reported. Can be one of [`-`, `low`, `+`,
            `high`, `~`, `mid`].
        empty:
            Reports aggregations for empty buckets.

        For more information: https://redis.io/commands/ts.mrange/
        )"_TimeSeriesCommands__mrange_paramsr   
MRANGE_CMDr   r.   r/   rR   r=   r4   r5   rS   r>   r?   r@   rT   rU   rV   rA   rB   rC   rD   r   r   r   r   mrange  s(    BzTimeSeriesCommands.mrangec                 C   s:   |  |||||||||	|
|||||||}| jtf| S )a;  
        Query a range across multiple time-series by filters in reverse direction.

        Args:

        from_time:
            Start timestamp for the range query. - can be used to express the minimum possible timestamp (0).
        to_time:
            End timestamp for range query, + can be used to express the maximum possible timestamp.
        filters:
            Filter to match the time-series labels.
        count:
            Limits the number of returned samples.
        aggregation_type:
            Optional aggregation type. Can be one of [`avg`, `sum`, `min`, `max`,
            `range`, `count`, `first`, `last`, `std.p`, `std.s`, `var.p`, `var.s`, `twa`]
        bucket_size_msec:
            Time bucket for aggregation in milliseconds.
        with_labels:
            Include in the reply all label-value pairs representing metadata labels of the time series.
        filter_by_ts:
            List of timestamps to filter the result by specific timestamps.
        filter_by_min_value:
            Filter result by minimum value (must mention also filter_by_max_value).
        filter_by_max_value:
            Filter result by maximum value (must mention also filter_by_min_value).
        groupby:
            Grouping by fields the results (must mention also reduce).
        reduce:
            Applying reducer functions on each group. Can be one of [`avg` `sum`, `min`,
            `max`, `range`, `count`, `std.p`, `std.s`, `var.p`, `var.s`].
        select_labels:
            Include in the reply only a subset of the key-value pair labels of a series.
        align:
            Timestamp for alignment control for aggregation.
        latest:
            Used when a time series is a compaction, reports the compacted
            value of the latest possibly partial bucket
        bucket_timestamp:
            Controls how bucket timestamps are reported. Can be one of [`-`, `low`, `+`,
            `high`, `~`, `mid`].
        empty:
            Reports aggregations for empty buckets.

        For more information: https://redis.io/commands/ts.mrevrange/
        )rZ   r   MREVRANGE_CMDr\   r   r   r   	mrevranger  s(    BzTimeSeriesCommands.mrevrange)r   rB   c                 C   s"   |g}|  || | jtf| S )z# noqa
        Get the last sample of `key`.
        `latest` used when a time series is a compaction, reports the compacted
        value of the latest (possibly partial) bucket

        For more information: https://redis.io/commands/ts.get/
        )rE   r   GET_CMD)r   r   rB   r   r   r   r   get  s    zTimeSeriesCommands.get)rR   rS   rV   rB   c                 C   sB   g }|  || | ||| |dg ||7 }| jtf| S )ao  # noqa
        Get the last samples matching the specific `filter`.

        Args:

        filters:
            Filter to match the time-series labels.
        with_labels:
            Include in the reply all label-value pairs representing metadata
            labels of the time series.
        select_labels:
            Include in the reply only a subset of the key-value pair labels of a series.
        latest:
            Used when a time series is a compaction, reports the compacted
            value of the latest possibly partial bucket

        For more information: https://redis.io/commands/ts.mget/
        rW   )rE   rX   r%   r   MGET_CMD)r   rR   rS   rV   rB   r   r   r   r   mget  s    zTimeSeriesCommands.mget)r   c                 C   s   |  t|S )zs# noqa
        Get information of `key`.

        For more information: https://redis.io/commands/ts.info/
        )r   INFO_CMD)r   r   r   r   r   info  s    zTimeSeriesCommands.info)rR   c                 C   s   | j tf| S )z# noqa
        Get all time series keys matching the `filter` list.

        For more information: https://redis.io/commands/ts.queryindex/
        )r   QUERYINDEX_CMD)r   rR   r   r   r   
queryindex  s    zTimeSeriesCommands.queryindexr   r   c                 C   s   |r|  dg dS )z"Append UNCOMPRESSED tag to params.ZUNCOMPRESSEDNr%   rh   r   r   r   r     s    z'TimeSeriesCommands._append_uncompressedr   rS   rV   c                 C   s6   |r|rt d|r | dg |r2| d| dS )z!Append labels behavior to params.z:with_labels and select_labels cannot be provided together.Z
WITHLABELSSELECTED_LABELSN)rk   )r   r%   rj   r   r   r   rX     s    z&TimeSeriesCommands._append_with_labelsr   rT   rU   c                 C   s*   |dk	r&|dk	r&|  d|d| g dS )z)Append GROUPBY REDUCE property to params.NZGROUPBYREDUCE)r%   upperrl   r   r   r   rY     s    z)TimeSeriesCommands._append_groupby_reducer   Z	retentionc                 C   s   |dk	r|  d|g dS )z$Append RETENTION property to params.NZ	RETENTIONri   ro   r   r   r   r   %  s    z$TimeSeriesCommands._append_retention)r   r   c                 C   s2   |r.|  d | D ]\}}| ||g qdS )z!Append LABELS property to params.LABELSN)r8   itemsr%   )r   r   kvr   r   r   r   +  s    
z!TimeSeriesCommands._append_labelsr   r=   c                 C   s   |dk	r|  d|g dS )z Append COUNT property to params.NZCOUNTri   rt   r   r   r   rH   3  s    z TimeSeriesCommands._append_countr   r    c                 C   s   |dk	r|  d|g dS )z$Append TIMESTAMP property to params.N	TIMESTAMPri   ru   r   r   r   r(   9  s    z$TimeSeriesCommands._append_timestampr   rA   c                 C   s   |dk	r|  d|g dS )z Append ALIGN property to params.NZALIGNri   rw   r   r   r   rI   ?  s    z TimeSeriesCommands._append_alignr   r4   r5   c                 C   s   |dk	r|  d||g dS )z&Append AGGREGATION property to params.NZAGGREGATIONri   rx   r   r   r   r7   E  s    z&TimeSeriesCommands._append_aggregationr   r   c                 C   s   |dk	r|  d|g dS )z%Append CHUNK_SIZE property to params.NZ
CHUNK_SIZEri   ry   r   r   r   r   O  s    z%TimeSeriesCommands._append_chunk_sizer   commandr   c                 C   s2   |dk	r.|dkr |  d|g n|  d|g dS )z^Append DUPLICATE_POLICY property to params on CREATE
        and ON_DUPLICATE on ADD.
        Nr
   ZON_DUPLICATEZDUPLICATE_POLICYri   rz   r   r   r   r   U  s    z+TimeSeriesCommands._append_duplicate_policyr   Zts_listc                 C   s   |dk	r|  d| dS )z'Append FILTER_BY_TS property to params.NFILTER_BY_TS)r}   ri   r|   r   r   r   rF   b  s    z&TimeSeriesCommands._append_filer_by_tsr   Z	min_valueZ	max_valuec                 C   s$   |dk	r |dk	r |  d||g dS )z*Append FILTER_BY_VALUE property to params.NZFILTER_BY_VALUEri   r~   r   r   r   rG   h  s    z)TimeSeriesCommands._append_filer_by_valuer   rB   c                 C   s   |r|  d dS )z!Append LATEST property to params.ZLATESTNr8   r   r   r   r   rE   p  s    z!TimeSeriesCommands._append_latestr   rC   c                 C   s   |dk	r|  d|g dS )z+Append BUCKET_TIMESTAMP property to params.NZBUCKETTIMESTAMPri   r   r   r   r   rJ   v  s    z+TimeSeriesCommands._append_bucket_timestampr   rD   c                 C   s   |r|  d dS )z Append EMPTY property to params.ZEMPTYNr   r   r   r   r   rK   |  s    z TimeSeriesCommands._append_empty)NFNNN)NNNN)NFNNN)NNFNN)NNFNN)N)
NNr   NNNNFNF)
NNr   NNNNFNF)NNr   FNNNNNNNFNF)NNr   FNNNNNNNFNF)F)FNF)2__name__
__module____qualname____doc__r   r   intboolr   strr   r   r   r	   r#   r   r   r'   r+   r-   r1   r:   r<   rM   rO   rQ   rZ   r]   r_   ra   rc   re   rg   staticmethodr   rX   rY   r   r   rH   r(   rI   r7   r   r   rF   rG   rE   rJ   rK   r   r   r   r   r      s<       1    0     
4$     /     + $



"          


K          


J



)              



]              



X   
 
  "	    r   N)typingr   r   r   r   r   Zredis.exceptionsr   Zredis.typingr   r	   r"   r   r9   r   r,   r;   r0   r`   r)   rd   r&   rb   r[   r^   rf   rN   rP   r   r   r   r   r   <module>   s(   