o
    rPf_                     @   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					dndedee dee deee	e	f  dee d	ee	 fd
dZ
				dodedee deee	e	f  dee d	ee	 f
ddZ					dndedeee	f dedee dee deee	e	f  dee d	ee	 fddZdeeeeee	f ef  fddZ					dpdededeeee	f  dee dee deee	e	f  dee fddZ					dpdededeeee	f  dee dee deee	e	f  dee fddZdededefddZ	dqdedede	d ed!ee f
d"d#Zdedefd$d%Zdedeee	f deee	f d&ee dee	 d ee d'eee  d(ee d)ee d*eeee	f  d+ee d,ee	 d-ee fd.d/Z			0							drdedeee	f deee	f d&ee dee	 d ee d'eee  d(ee d)ee d*eeee	f  d+ee d,ee	 d-ee fd1d2Z			0							drdedeee	f deee	f d&ee dee	 d ee d'eee  d(ee d)ee d*eeee	f  d+ee d,ee	 d-ee fd3d4Zdee	 d ee d&ee d5ee	 deee	f deee	f d6ee d'eee  d(ee d)ee d7ee	 d8ee	 d9eee	  d*eeee	f  d+ee d,ee	 d-ee f"d:d;Z			0											dsdeee	f deee	f d5ee	 d&ee dee	 d ee d6ee d'eee  d(ee d)ee d7ee	 d8ee	 d9eee	  d*eeee	f  d+ee d,ee	 d-ee f"d<d=Z			0											dsdeee	f deee	f d5ee	 d&ee dee	 d ee d6ee d'eee  d(ee d)ee d7ee	 d8ee	 d9eee	  d*eeee	f  d+ee d,ee	 d-ee f"d>d?Zdtded+ee fd@dAZ			dud5ee	 d6ee d9eee	  d+ee fdBdCZdefdDdEZd5ee	 fdFdGZ e!dHee	 dee fdIdJZ"e!dHee	 d6ee d9eee	  fdKdLZ#e!dHee	 d7ee	 d8ee	 fdMdNZ$e!dHee	 dOee fdPdQZ%e!dHee	 deee	  fdRdSZ&e!dHee	 d&ee fdTdUZ'e!dHee	 dee fdVdWZ(e!dHee	 d*eeee	f  fdXdYZ)e!dHee	 dee	 d ee fdZd[Z*e!dHee	 dee fd\d]Z+e!dHee	 d^ee	 d	ee	 fd_d`Z,e!dHee	 daeee  fdbdcZ-e!dHee	 ddee deee fdfdgZ.e!dHee	 d+ee fdhdiZ/e!dHee	 d,ee	 fdjdkZ0e!dHee	 d-ee fdldmZ1dS )vTimeSeriesCommandszRedisTimeSeries Commands.NFkeyretention_msecsuncompressedlabels
chunk_sizeduplicate_policyc                 C   sV   |g}|  || | || | || | |t| | || | jtg|R  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.
            - 'sum': If a previous sample exists, add the new sample to it so that             the updated value is equal to (previous + new). If no previous sample             exists, set the updated value equal to the new 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   c/var/www/html/humari/django-venv/lib/python3.10/site-packages/redis/commands/timeseries/commands.pycreate   s   (zTimeSeriesCommands.createc                 C   sJ   |g}|  || | || | |t| | || | jtg|R  S )aa  
        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.
            - 'sum': If a previous sample exists, add the new sample to it so that             the updated value is equal to (previous + new). If no previous sample             exists, set the updated value equal to the new 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   alterM   s   &zTimeSeriesCommands.alter	timestampvaluec	           
      C   sZ   |||g}	|  |	| | |	| | |	| | |	t| | |	| | jtg|	R  S )aQ  
        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.
            - 'sum': If a previous sample exists, add the new sample to it so that             the updated value is equal to (previous + new). If no previous sample             exists, set the updated value equal to the new 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   add{   s   
.zTimeSeriesCommands.add
ktv_tuplesc                 C   s*   g }|D ]}| | q| jtg|R  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   ktvr   r   r   madd   s   	zTimeSeriesCommands.maddc           	      C   V   ||g}|  || | || | || | || | || | jtg|R  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      "zTimeSeriesCommands.incrbyc           	      C   r)   )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   r.   zTimeSeriesCommands.decrby	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   r1   r2   r   r   r   delete  s   zTimeSeriesCommands.delete
source_keydest_keyaggregation_typebucket_size_msecalign_timestampc                 C   s:   ||g}|  ||| |dur|| | jtg|R  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   r5   r6   r7   r8   r9   r   r   r   r   
createrule(  s
   
zTimeSeriesCommands.createrulec                 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   r5   r6   r   r   r   
deleteruleL  s   zTimeSeriesCommands.deleterulecount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_alignr:   _append_bucket_timestamp_append_emptyr   r   r1   r2   r@   r7   r8   rA   rB   rC   rD   rE   rF   rG   r   r   r   r   __range_paramsT  s   
z!TimeSeriesCommands.__range_paramsr   c                 C   4   |  |||||||||	|
|||}| jtg|R  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_CMDrO   r   r   r   rangeq  s    5zTimeSeriesCommands.rangec                 C   rQ   )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/
        )rR   r   REVRANGE_CMDrO   r   r   r   revrange  s    7zTimeSeriesCommands.revrangefilterswith_labelsgroupbyreduceselect_labelsc                 C   s   ||g}|  || | || | ||	|
 | ||| | || | || | ||| | || | || |	dg ||7 }| 
||| |S )z,Create TS.MRANGE and TS.MREVRANGE arguments.FILTER)rH   rI   rJ   _append_with_labelsrK   rL   r:   rM   rN   r%   _append_groupby_reduce)r   r7   r8   r@   rW   r1   r2   rX   rA   rB   rC   rY   rZ   r[   rD   rE   rF   rG   r   r   r   r   __mrange_params  s   z"TimeSeriesCommands.__mrange_paramsc                 C   <   |  |||||||||	|
|||||||}| jtg|R  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   r1   r2   rW   r@   r7   r8   rX   rA   rB   rC   rY   rZ   r[   rD   rE   rF   rG   r   r   r   r   mrange#  (   BzTimeSeriesCommands.mrangec                 C   r`   )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/
        )ra   r   MREVRANGE_CMDrc   r   r   r   	mrevrange{  re   zTimeSeriesCommands.mrevrangec                 C   s$   |g}|  || | jtg|R  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/
        )rH   r   GET_CMD)r   r   rE   r   r   r   r   get  s   zTimeSeriesCommands.getc                 C   sD   g }|  || | ||| |dg ||7 }| jtg|R  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/
        r\   )rH   r]   r%   r   MGET_CMD)r   rW   rX   r[   rE   r   r   r   r   mget  s   zTimeSeriesCommands.mgetc                 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.infoc                 C   s   | j tg|R  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   rW   r   r   r   
queryindex  s   zTimeSeriesCommands.queryindexr   c                 C   s   |r
|  dg dS dS )z"Append UNCOMPRESSED tag to params.UNCOMPRESSEDNr%   )r   r   r   r   r   r     s   z'TimeSeriesCommands._append_uncompressedc                 C   s<   |r|rt d|r| dg |r| dg| dS dS )z!Append labels behavior to params.z:with_labels and select_labels cannot be provided together.
WITHLABELSSELECTED_LABELSN)r   r%   )r   rX   r[   r   r   r   r]     s   z&TimeSeriesCommands._append_with_labelsc                 C   s2   |dur|dur|  d|d| g dS dS dS )z)Append GROUPBY REDUCE property to params.NGROUPBYREDUCE)r%   upper)r   rY   rZ   r   r   r   r^   &  s   z)TimeSeriesCommands._append_groupby_reduce	retentionc                 C      |dur|  d|g dS dS )z$Append RETENTION property to params.N	RETENTIONrq   )r   rw   r   r   r   r   .     z$TimeSeriesCommands._append_retentionc                 C   s6   |r|  d | D ]\}}| ||g qdS dS )z!Append LABELS property to params.LABELSN)r;   itemsr%   )r   r   kvr   r   r   r   4  s   
z!TimeSeriesCommands._append_labelsc                 C   rx   )z Append COUNT property to params.NCOUNTrq   )r   r@   r   r   r   rK   <  rz   z TimeSeriesCommands._append_countc                 C   rx   )z$Append TIMESTAMP property to params.N	TIMESTAMPrq   )r   r    r   r   r   r*   B  rz   z$TimeSeriesCommands._append_timestampc                 C   rx   )z Append ALIGN property to params.NALIGNrq   )r   rD   r   r   r   rL   H  rz   z TimeSeriesCommands._append_alignc                 C   s    |dur|  d||g dS dS )z&Append AGGREGATION property to params.NAGGREGATIONrq   )r   r7   r8   r   r   r   r:   N  s   z&TimeSeriesCommands._append_aggregationc                 C   rx   )z%Append CHUNK_SIZE property to params.N
CHUNK_SIZErq   )r   r   r   r   r   r   X  rz   z%TimeSeriesCommands._append_chunk_sizecommandc                 C   s8   |dur|dkr|  d|g dS |  d|g dS dS )z^Append DUPLICATE_POLICY property to params on CREATE
        and ON_DUPLICATE on ADD.
        Nr
   ON_DUPLICATEDUPLICATE_POLICYrq   )r   r   r   r   r   r   r   ^  s
   z+TimeSeriesCommands._append_duplicate_policyts_listc                 C   s    |dur|  dg| dS dS )z'Append FILTER_BY_TS property to params.NFILTER_BY_TSrq   )r   r   r   r   r   rI   k  s   z&TimeSeriesCommands._append_filer_by_ts	min_value	max_valuec                 C   s,   |dur|dur|  d||g dS dS dS )z*Append FILTER_BY_VALUE property to params.NFILTER_BY_VALUErq   )r   r   r   r   r   r   rJ   q  s   z)TimeSeriesCommands._append_filer_by_valuec                 C      |r	|  d dS dS )z!Append LATEST property to params.LATESTNr;   )r   rE   r   r   r   rH   y     z!TimeSeriesCommands._append_latestc                 C   rx   )z+Append BUCKET_TIMESTAMP property to params.NBUCKETTIMESTAMPrq   )r   rF   r   r   r   rM     rz   z+TimeSeriesCommands._append_bucket_timestampc                 C   r   )z Append EMPTY property to params.EMPTYNr   )r   rG   r   r   r   rN     r   z TimeSeriesCommands._append_empty)NFNNN)NNNN)NNFNN)N)
NNr   NNNNFNF)NNr   FNNNNNNNFNF)F)FNF)2__name__
__module____qualname____doc__r   r   intboolr   strr   r   r   r	   r#   r   r   r(   r-   r0   r4   r=   r?   rR   rT   rV   ra   rd   rg   ri   rk   rm   ro   staticmethodr   r]   r^   r   r   rK   r*   rL   r:   r   r   rI   rJ   rH   rM   rN   r   r   r   r   r      sN   
4
3
	
$7
/
+
$


	

"


	

K


	

H


	


)


	


]


	


X

 
 $	  r   N)typingr   r   r   r   r   redis.exceptionsr   redis.typingr   r	   r"   r   r<   r   r/   r>   r3   rh   r+   rl   r&   rj   rb   rf   rn   rS   rU   r   r   r   r   r   <module>   s*    