
    ph                     0    S SK Jr  SSKJr   " S S5      rg)   )	nativestr   )list_to_dictc                   Z    \ rS rSrSr/ r/ rSrSrSr	Sr
SrSrSrSrSrSrS rS rS rSrg)TSInfo   z
Hold information and statistics on the time-series.
Can be created using ``tsinfo`` command
https://redis.io/docs/latest/commands/ts.info/
Nc                    [        [        [        [        USSS2   5      USSS2   5      5      nUR	                  S5      U l        UR	                  S5      U l        UR	                  S5      U l        UR	                  S5      U l        UR	                  S5      U l	        [        UR	                  S	5      5      U l        UR	                  S
5      U l        UR	                  S5      U l        UR	                  S5      U l        SU;   a  US   U l        U R                  S-  U l        SU;   a
  US   U l        SU;   aJ  US   U l        [%        U R"                  [&        5      (       a   U R"                  R)                  5       U l        ggg)a  
Hold information and statistics on the time-series.

The supported params that can be passed as args:

rules:
    A list of compaction rules of the time series.
sourceKey:
    Key name for source time series in case the current series
    is a target of a rule.
chunkCount:
    Number of Memory Chunks used for the time series.
memoryUsage:
    Total number of bytes allocated for the time series.
totalSamples:
    Total number of samples in the time series.
labels:
    A list of label-value pairs that represent the metadata
    labels of the time series.
retentionTime:
    Retention time, in milliseconds, for the time series.
lastTimestamp:
    Last timestamp present in the time series.
firstTimestamp:
    First timestamp present in the time series.
maxSamplesPerChunk:
    Deprecated.
chunkSize:
    Amount of memory, in bytes, allocated for data.
duplicatePolicy:
    Policy that will define handling of duplicate samples.

Can read more about on
https://redis.io/docs/latest/develop/data-types/timeseries/configuration/#duplicate_policy
Nr   r   rules	sourceKey
chunkCountmemoryUsagetotalSampleslabelsretentionTimelastTimestampfirstTimestampmaxSamplesPerChunk   	chunkSizeduplicatePolicy)dictzipmapr   getr
   
source_keychunk_countmemory_usagetotal_samplesr   r   retention_msecslast_timestampfirst_timestampmax_samples_per_chunk
chunk_sizeduplicate_policy
isinstancebytesdecode)selfargsresponses      X/home/james-whalen/.local/lib/python3.13/site-packages/redis/commands/timeseries/info.py__init__TSInfo.__init__   sV   H C	4!95tADqDzBC\\'*
",,{3#<<5$LL7%\\.9"8<<#9:'||O<&ll?;'||,<=8+)12F)GD&**R/ O ("&{3DO($,->$?D!$//77(,(=(=(D(D(F% 8 )    c                 F     U R                  U5      $ ! [         a     g f = fN)__getitem__AttributeErrorr(   items     r+   r   
TSInfo.getT   s*    	##D)) 		s    
  c                     [        X5      $ r0   )getattrr3   s     r+   r1   TSInfo.__getitem__Z   s    t""r.   )r   r#   r$   r!   r   r    r"   r   r   r
   r   r   )__name__
__module____qualname____firstlineno____doc__r
   r   r   r   r   r   r   last_time_stampfirst_time_stampr"   r#   r$   r,   r   r1   __static_attributes__ r.   r+   r   r      sY     EFIKLMOO J8Gt#r.   r   N)helpersr   utilsr   r   rA   r.   r+   <module>rD      s     V# V#r.   