
    phz                     "   S SK r S SKJr  SSKJrJr  SSKJrJrJ	r	J
r
JrJrJrJrJrJrJrJrJrJr  SSKJr  SSKJrJrJrJr   " S	 S
\5      r " S S\\ R:                  R<                  5      r " S S\\ R>                  R@                  5      r g)    N)bool_ok   )get_protocol_versionparse_to_list   )	ALTER_CMD
CREATE_CMDCREATERULE_CMDDEL_CMDDELETERULE_CMDGET_CMDINFO_CMDMGET_CMD
MRANGE_CMDMREVRANGE_CMDQUERYINDEX_CMD	RANGE_CMDREVRANGE_CMDTimeSeriesCommands)TSInfo)	parse_getparse_m_getparse_m_rangeparse_rangec                   ,    \ rS rSrSrSS jrSS jrSrg)	
TimeSeries   z
This class subclasses redis-py's `Redis` and implements RedisTimeSeries's
commands (prefixed with "ts").
The client allows to interact with RedisTimeSeries and use all of it's
functionality.
Nc                 h   [         [        [        [        [        [        [        [        0U l        [        [        [        [        [        [        [        [        [        [        [         [        ["        [$        [&        [$        [(        [*        0	n0 nXl        UR.                  U l        [1        U R,                  5      S;   a  U R
                  R3                  U5        OU R
                  R3                  U5        U R
                  R5                  5        H   u  pVU R,                  R7                  XV5        M"     g)z$Create a new RedisTimeSeries client.)3   N)r   r   r	   r
   r   _MODULE_CALLBACKSr   intr   r   r   r   r   r   r   r   r   r   r   r   r   r   clientexecute_commandr   updateitemsset_response_callback)selfr#   kwargs_RESP2_MODULE_CALLBACKS_RESP3_MODULE_CALLBACKSkvs          \/home/james-whalen/.local/lib/python3.13/site-packages/redis/commands/timeseries/__init__.py__init__TimeSeries.__init__!   s     wGG	"
 SYfk={+M
#
 #%%55,8""))*AB""))*AB**002DAKK--a3 3    c                 j   [        U R                  [        R                  5      (       a  [	        U R                  R
                  U R                  R                  U R                  R
                  R                  U R                  R                  U R                  R                  U R                  R                  R                  5       U R                  R                  U R                  R                  U R                  R                  S9	nU$ [        U R                  R                   U R"                  UUS9nU$ )a  Creates a pipeline for the TimeSeries module, that can be used
for executing only TimeSeries commands and core commands.

Usage example:

r = redis.Redis()
pipe = r.ts().pipeline()
for i in range(100):
    pipeline.add("with_pipeline", i, 1.1 * i)
pipeline.execute()

)	nodes_managercommands_parserstartup_nodesresult_callbackscluster_response_callbackscluster_error_retry_attemptsread_from_replicasreinitialize_stepslock)connection_poolresponse_callbackstransaction
shard_hint)
isinstancer#   redisRedisClusterClusterPipeliner3   r4   r5   r6   r7   retryget_retriesr9   r:   _lockPipeliner<   r!   )r(   r>   r?   ps       r.   pipelineTimeSeries.pipelineC   s     dkk5#5#566"kk77 $ ; ;"kk77EE!%!=!=+/;;+Q+Q-1[[->->-J-J-L#';;#A#A#';;#A#A[[&&
A&   $ ; ;#'#9#9'%	A r1   )r!   r#   r$   )N)TN)__name__
__module____qualname____firstlineno____doc__r/   rI   __static_attributes__ r1   r.   r   r      s     4D!r1   r   c                       \ rS rSrSrSrg)rC   g   z Cluster pipeline for the module.rQ   NrK   rL   rM   rN   rO   rP   rQ   r1   r.   rC   rC   g   s    *r1   rC   c                       \ rS rSrSrSrg)rG   k   zPipeline for the module.rQ   NrT   rQ   r1   r.   rG   rG   k   s    "r1   rG   )!rA   redis._parsers.helpersr   helpersr   r   commandsr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   infor   utilsr   r   r   r   r   clusterrC   r#   rG   rQ   r1   r.   <module>r]      so     * 9      E EK# K\+(%--*G*G +#!5<<#8#8 #r1   