shell bypass 403
UnknownSec Shell
:
/
lib
/
python3
/
dist-packages
/
redis
/
commands
/
timeseries
/
__pycache__
/ [
drwxr-xr-x
]
upload
mass deface
mass delete
console
info server
name :
commands.cpython-312.pyc
� ���bvn � �h � d dl mZ dZdZdZdZdZdZdZd Z d Z dZdZd Z dZdZdZdZdZ G d� d� Zy)� )� DataError�TS.ADDzTS.ALTERz TS.CREATERULEz TS.CREATEz TS.DECRBYz TS.DELETERULEzTS.DELzTS.GETz TS.INCRBYzTS.INFOzTS.MADDzTS.MGETz TS.MRANGEzTS.MREVRANGEz TS.QUERYINDEXzTS.RANGEzTS.REVRANGEc � � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d#d �Z d#d�Zd� Z d$d�Z d$d�Zd� Zd%d�Zd� Zd� Zed� � Zed&d�� Zed� � Zed� � Zed� � Zed� � Zed� � Zed� � Zed� � Z ed� � Z!ed � � Z"ed!� � Z#ed"� � Z$y)'�TimeSeriesCommandszRedisTimeSeries Commands.c � � |j dd� }|j dd� }|j di � }|j dd� }|j dd� }|g}| j ||� | j ||� | j ||� | j |t |� | j ||� | j t g|��� S )af Create a new time-series. Args: key: time-series key 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: Since RedisTimeSeries v1.2, both timestamps and values are compressed by default. Adding this flag will keep data in an uncompressed form. Compression not only saves memory but usually improve performance due to lower number of memory accesses. labels: Set of label-value pairs that represent metadata labels of the key. chunk_size: Each time-serie uses chunks of memory of fixed size for time series samples. You can alter the default TSDB chunk size by passing the chunk_size argument (in Bytes). duplicate_policy: Since RedisTimeSeries v1.4 you can specify the duplicate sample policy ( Configure what to do on duplicate sample. ) 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. When this is not set, the server-wide default will be used. For more information: https://oss.redis.com/redistimeseries/commands/#tscreate �retention_msecsN�uncompressedF�labels� chunk_size�duplicate_policy)�get�_append_retention�_append_uncompressed�_append_chunk_size�_append_duplicate_policy� CREATE_CMD�_append_labels�execute_command) �self�key�kwargsr r r r r �paramss �D/usr/lib/python3/dist-packages/redis/commands/timeseries/commands.py�createzTimeSeriesCommands.create s� � �L !�*�*�%6��=���z�z�.�%�8�����H�b�)���Z�Z��d�3� �!�:�:�&8�$�?��������v��7��!�!�&�,�7����� �3��%�%�f�j�:J�K����F�F�+�#�t�#�#�J�8��8�8� c � � |j dd� }|j di � }|j dd� }|g}| j ||� | j |t |� | j ||� | j t g|��� S )z� Update the retention, labels of an existing key. For more information see The parameters are the same as TS.CREATE. For more information: https://oss.redis.com/redistimeseries/commands/#tsalter r Nr r )r r r � ALTER_CMDr r )r r r r r r r s r �alterzTimeSeriesCommands.alterM s� � � !�*�*�%6��=�����H�b�)��!�:�:�&8�$�?��������v��7��%�%�f�i�9I�J����F�F�+�#�t�#�#�I�7��7�7r c � � |j dd� }|j dd� }|j di � }|j dd� }|j dd� } |||g} | j | |� | j | |� | j | |� | j | t | � | j | |� | j t g| ��� S )a! Append (or create and append) a new sample to the series. For more information see 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 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: Since RedisTimeSeries v1.2, both timestamps and values are compressed by default. Adding this flag will keep data in an uncompressed form. Compression not only saves memory but usually improve performance due to lower number of memory accesses. labels: Set of label-value pairs that represent metadata labels of the key. chunk_size: Each time-serie uses chunks of memory of fixed size for time series samples. You can alter the default TSDB chunk size by passing the chunk_size argument (in Bytes). duplicate_policy: Since RedisTimeSeries v1.4 you can specify the duplicate sample policy (Configure what to do on duplicate sample). 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. When this is not set, the server-wide default will be used. For more information: https://oss.redis.com/redistimeseries/master/commands/#tsadd r Nr Fr r r )r r r r r �ADD_CMDr r )r r � timestamp�valuer r r r r r r s r �addzTimeSeriesCommands.add` s� � �L !�*�*�%6��=���z�z�.�%�8�����H�b�)���Z�Z��d�3� �!�:�:�&8�$�?���y�%�(�����v��7��!�!�&�,�7����� �3��%�%�f�g�7G�H����F�F�+�#�t�#�#�G�5�f�5�5r c �r � g }|D ] }|D ] }|j |� � � | j t g|��� S )aH 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://oss.redis.com/redistimeseries/master/commands/#tsmadd )�appendr �MADD_CMD)r � ktv_tuplesr �ktv�items r �maddzTimeSeriesCommands.madd� sM � � ��� $�C�� $��� � �d�#� $� $� $�t�#�#�H�6�v�6�6r c � � |j dd� }|j dd� }|j dd� }|j di � }|j dd� }||g} | j | |� | j | |� | j | |� | j | |� | j | |� | j t g| ��� S )aN 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. None 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: Since RedisTimeSeries v1.2, both timestamps and values are compressed by default. Adding this flag will keep data in an uncompressed form. Compression not only saves memory but usually improve performance due to lower number of memory accesses. labels: Set of label-value pairs that represent metadata labels of the key. chunk_size: Each time-series uses chunks of memory of fixed size for time series samples. You can alter the default TSDB chunk size by passing the chunk_size argument (in Bytes). For more information: https://oss.redis.com/redistimeseries/master/commands/#tsincrbytsdecrby r! Nr r Fr r )r �_append_timestampr r r r r � INCRBY_CMD� r r r"