diff options
-rw-r--r-- | docs/index.rst | 2 | ||||
-rw-r--r-- | redis/commands/json/commands.py | 86 | ||||
-rw-r--r-- | redis/commands/search/commands.py | 118 | ||||
-rw-r--r-- | redis/commands/timeseries/commands.py | 62 |
4 files changed, 181 insertions, 87 deletions
diff --git a/docs/index.rst b/docs/index.rst index 392acad..8e243f3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -73,4 +73,4 @@ Contributing License ******* -This projectis licensed under the `MIT license <https://github.com/redis/redis-py/blob/master/LICENSE>`_.
\ No newline at end of file +This projectis licensed under the `MIT license <https://github.com/redis/redis-py/blob/master/LICENSE>`_. diff --git a/redis/commands/json/commands.py b/redis/commands/json/commands.py index 4436f6a..1affaaf 100644 --- a/redis/commands/json/commands.py +++ b/redis/commands/json/commands.py @@ -10,7 +10,9 @@ class JSONCommands: def arrappend(self, name, path=Path.rootPath(), *args): """Append the objects ``args`` to the array under the ``path` in key ``name``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonarrappend + """ # noqa pieces = [name, str(path)] for o in args: pieces.append(self._encode(o)) @@ -23,7 +25,9 @@ class JSONCommands: The search can be limited using the optional inclusive ``start`` and exclusive ``stop`` indices. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonarrindex + """ # noqa return self.execute_command( "JSON.ARRINDEX", name, str(path), self._encode(scalar), start, stop @@ -32,7 +36,9 @@ class JSONCommands: def arrinsert(self, name, path, index, *args): """Insert the objects ``args`` to the array at index ``index`` under the ``path` in key ``name``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonarrinsert + """ # noqa pieces = [name, str(path), index] for o in args: pieces.append(self._encode(o)) @@ -41,45 +47,64 @@ class JSONCommands: def arrlen(self, name, path=Path.rootPath()): """Return the length of the array JSON value under ``path`` at key``name``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonarrlen + """ # noqa return self.execute_command("JSON.ARRLEN", name, str(path)) def arrpop(self, name, path=Path.rootPath(), index=-1): """Pop the element at ``index`` in the array JSON value under ``path`` at key ``name``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonarrpop + """ # noqa return self.execute_command("JSON.ARRPOP", name, str(path), index) def arrtrim(self, name, path, start, stop): """Trim the array JSON value under ``path`` at key ``name`` to the inclusive range given by ``start`` and ``stop``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonarrtrim + """ # noqa return self.execute_command("JSON.ARRTRIM", name, str(path), start, stop) def type(self, name, path=Path.rootPath()): - """Get the type of the JSON value under ``path`` from key ``name``.""" + """Get the type of the JSON value under ``path`` from key ``name``. + + For more information: https://oss.redis.com/redisjson/commands/#jsontype + """ # noqa return self.execute_command("JSON.TYPE", name, str(path)) def resp(self, name, path=Path.rootPath()): - """Return the JSON value under ``path`` at key ``name``.""" + """Return the JSON value under ``path`` at key ``name``. + + For more information: https://oss.redis.com/redisjson/commands/#jsonresp + """ # noqa return self.execute_command("JSON.RESP", name, str(path)) def objkeys(self, name, path=Path.rootPath()): """Return the key names in the dictionary JSON value under ``path`` at - key ``name``.""" + key ``name``. + + For more information: https://oss.redis.com/redisjson/commands/#jsonobjkeys + """ # noqa return self.execute_command("JSON.OBJKEYS", name, str(path)) def objlen(self, name, path=Path.rootPath()): """Return the length of the dictionary JSON value under ``path`` at key ``name``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonobjlen + """ # noqa return self.execute_command("JSON.OBJLEN", name, str(path)) def numincrby(self, name, path, number): """Increment the numeric (integer or floating point) JSON value under ``path`` at key ``name`` by the provided ``number``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonnumincrby + """ # noqa return self.execute_command( "JSON.NUMINCRBY", name, str(path), self._encode(number) ) @@ -88,7 +113,9 @@ class JSONCommands: def nummultby(self, name, path, number): """Multiply the numeric (integer or floating point) JSON value under ``path`` at key ``name`` with the provided ``number``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonnummultby + """ # noqa return self.execute_command( "JSON.NUMMULTBY", name, str(path), self._encode(number) ) @@ -100,11 +127,16 @@ class JSONCommands: Return the count of cleared paths (ignoring non-array and non-objects paths). - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonclear + """ # noqa return self.execute_command("JSON.CLEAR", name, str(path)) def delete(self, key, path=Path.rootPath()): - """Delete the JSON value stored at key ``key`` under ``path``.""" + """Delete the JSON value stored at key ``key`` under ``path``. + + For more information: https://oss.redis.com/redisjson/commands/#jsondel + """ return self.execute_command("JSON.DEL", key, str(path)) # forget is an alias for delete @@ -117,7 +149,9 @@ class JSONCommands: ``args`` is zero or more paths, and defaults to root path ```no_escape`` is a boolean flag to add no_escape option to get non-ascii characters - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonget + """ # noqa pieces = [name] if no_escape: pieces.append("noescape") @@ -140,7 +174,9 @@ class JSONCommands: """ Get the objects stored as a JSON values under ``path``. ``keys`` is a list of one or more keys. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonmget + """ # noqa pieces = [] pieces += keys pieces.append(str(path)) @@ -157,6 +193,8 @@ class JSONCommands: For the purpose of using this within a pipeline, this command is also aliased to jsonset. + + For more information: https://oss.redis.com/redisjson/commands/#jsonset """ if decode_keys: obj = decode_dict_keys(obj) @@ -178,7 +216,9 @@ class JSONCommands: def strlen(self, name, path=None): """Return the length of the string JSON value under ``path`` at key ``name``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonstrlen + """ # noqa pieces = [name] if path is not None: pieces.append(str(path)) @@ -187,14 +227,18 @@ class JSONCommands: def toggle(self, name, path=Path.rootPath()): """Toggle boolean value under ``path`` at key ``name``. returning the new value. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsontoggle + """ # noqa return self.execute_command("JSON.TOGGLE", name, str(path)) def strappend(self, name, value, path=Path.rootPath()): """Append to the string JSON value. If two options are specified after the key name, the path is determined to be the first. If a single option is passed, then the rootpath (i.e Path.rootPath()) is used. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsonstrappend + """ # noqa pieces = [name, str(path), self._encode(value)] return self.execute_command( "JSON.STRAPPEND", *pieces @@ -203,7 +247,9 @@ class JSONCommands: def debug(self, subcommand, key=None, path=Path.rootPath()): """Return the memory usage in bytes of a value under ``path`` from key ``name``. - """ + + For more information: https://oss.redis.com/redisjson/commands/#jsondebg + """ # noqa valid_subcommands = ["MEMORY", "HELP"] if subcommand not in valid_subcommands: raise DataError("The only valid subcommands are ", diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index c19cb93..553bc39 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -79,7 +79,9 @@ class SearchCommands: allow searching in specific fields - **stopwords**: If not None, we create the index with this custom stopword list. The list can be empty - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftcreate + """ # noqa args = [CREATE_CMD, self.index_name] if definition is not None: @@ -109,7 +111,9 @@ class SearchCommands: ### Parameters: - **fields**: a list of Field objects to add for the index - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftalter_schema_add + """ # noqa args = [ALTER_CMD, self.index_name, "SCHEMA", "ADD"] try: @@ -119,17 +123,6 @@ class SearchCommands: return self.execute_command(*args) - def drop_index(self, delete_documents=True): - """ - Drop the index if it exists. Deprecated from RediSearch 2.0. - - ### Parameters: - - - **delete_documents**: If `True`, all documents will be deleted. - """ - keep_str = "" if delete_documents else "KEEPDOCS" - return self.execute_command(DROP_CMD, self.index_name, keep_str) - def dropindex(self, delete_documents=False): """ Drop the index if it exists. @@ -139,7 +132,8 @@ class SearchCommands: ### Parameters: - **delete_documents**: If `True`, all documents will be deleted. - """ + For more information: https://oss.redis.com/redisearch/Commands/#ftdropindex + """ # noqa keep_str = "" if delete_documents else "KEEPDOCS" return self.execute_command(DROP_CMD, self.index_name, keep_str) @@ -246,7 +240,9 @@ class SearchCommands: - **fields** kwargs dictionary of the document fields to be saved and/or indexed. NOTE: Geo points shoule be encoded as strings of "lon,lat" - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftadd + """ # noqa return self._add_document( doc_id, conn=None, @@ -278,7 +274,9 @@ class SearchCommands: - **replace**: if True, and the document already is in the index, we perform an update and reindex the document - **language**: Specify the language used for document tokenization. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftaddhash + """ # noqa return self._add_document_hash( doc_id, conn=None, @@ -296,7 +294,9 @@ class SearchCommands: - **delete_actual_document**: if set to True, RediSearch also delete the actual document if it is in the index - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftdel + """ # noqa args = [DEL_CMD, self.index_name, doc_id] if conn is None: conn = self.client @@ -327,6 +327,8 @@ class SearchCommands: ### Parameters - **ids**: the ids of the saved documents. + + For more information https://oss.redis.com/redisearch/Commands/#ftget """ return self.client.execute_command(MGET_CMD, self.index_name, *ids) @@ -335,6 +337,8 @@ class SearchCommands: """ Get info an stats about the the current index, including the number of documents, memory consumption, etc + + For more information https://oss.redis.com/redisearch/Commands/#ftinfo """ res = self.client.execute_command(INFO_CMD, self.index_name) @@ -362,7 +366,9 @@ class SearchCommands: - **query**: the search query. Either a text for simple queries with default parameters, or a Query object for complex queries. See RediSearch's documentation on query format - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftsearch + """ # noqa args, query = self._mk_query_args(query) st = time.time() res = self.execute_command(SEARCH_CMD, *args) @@ -376,6 +382,10 @@ class SearchCommands: ) def explain(self, query): + """Returns the execution plan for a complex query. + + For more information: https://oss.redis.com/redisearch/Commands/#ftexplain + """ # noqa args, query_text = self._mk_query_args(query) return self.execute_command(EXPLAIN_CMD, *args) @@ -392,7 +402,9 @@ class SearchCommands: An `AggregateResult` object is returned. You can access the rows from its `rows` property, which will always yield the rows of the result. - """ + + Fpr more information: https://oss.redis.com/redisearch/Commands/#ftaggregate + """ # noqa if isinstance(query, AggregateRequest): has_cursor = bool(query._cursor) cmd = [AGGREGATE_CMD, self.index_name] + query.build_args() @@ -477,7 +489,9 @@ class SearchCommands: suggestions (default: 1, max: 4). **include**: specifies an inclusion custom dictionary. **exclude**: specifies an exclusion custom dictionary. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftspellcheck + """ # noqa cmd = [SPELLCHECK_CMD, self.index_name, query] if distance: cmd.extend(["DISTANCE", distance]) @@ -534,7 +548,9 @@ class SearchCommands: - **name**: Dictionary name. - **terms**: List of items for adding to the dictionary. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftdictadd + """ # noqa cmd = [DICT_ADD_CMD, name] cmd.extend(terms) return self.execute_command(*cmd) @@ -546,7 +562,9 @@ class SearchCommands: - **name**: Dictionary name. - **terms**: List of items for removing from the dictionary. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftdictdel + """ # noqa cmd = [DICT_DEL_CMD, name] cmd.extend(terms) return self.execute_command(*cmd) @@ -557,7 +575,9 @@ class SearchCommands: ### Parameters - **name**: Dictionary name. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftdictdump + """ # noqa cmd = [DICT_DUMP_CMD, name] return self.execute_command(*cmd) @@ -568,7 +588,9 @@ class SearchCommands: - **option**: the name of the configuration option. - **value**: a value for the configuration option. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftconfig + """ # noqa cmd = [CONFIG_CMD, "SET", option, value] raw = self.execute_command(*cmd) return raw == "OK" @@ -579,7 +601,9 @@ class SearchCommands: ### Parameters - **option**: the name of the configuration option. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftconfig + """ # noqa cmd = [CONFIG_CMD, "GET", option] res = {} raw = self.execute_command(*cmd) @@ -595,7 +619,9 @@ class SearchCommands: ### Parameters - **tagfield**: Tag field name - """ + + For more information: https://oss.redis.com/redisearch/Commands/#fttagvals + """ # noqa return self.execute_command(TAGVALS_CMD, self.index_name, tagfield) @@ -606,7 +632,9 @@ class SearchCommands: ### Parameters - **alias**: Name of the alias to create - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftaliasadd + """ # noqa return self.execute_command(ALIAS_ADD_CMD, alias, self.index_name) @@ -617,7 +645,9 @@ class SearchCommands: ### Parameters - **alias**: Name of the alias to create - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftaliasupdate + """ # noqa return self.execute_command(ALIAS_UPDATE_CMD, alias, self.index_name) @@ -628,7 +658,9 @@ class SearchCommands: ### Parameters - **alias**: Name of the alias to delete - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftaliasdel + """ # noqa return self.execute_command(ALIAS_DEL_CMD, alias) def sugadd(self, key, *suggestions, **kwargs): @@ -637,8 +669,9 @@ class SearchCommands: a score and string. If kwargs["increment"] is true and the terms are already in the server's dictionary, we increment their scores. - More information `here <https://oss.redis.com/redisearch/master/Commands/#ftsugadd>`_. # noqa - """ + + For more information: https://oss.redis.com/redisearch/master/Commands/#ftsugadd + """ # noqa # If Transaction is not False it will MULTI/EXEC which will error pipe = self.pipeline(transaction=False) for sug in suggestions: @@ -656,16 +689,18 @@ class SearchCommands: def suglen(self, key): """ Return the number of entries in the AutoCompleter index. - More information `here <https://oss.redis.com/redisearch/master/Commands/#ftsuglen>`_. # noqa - """ + + For more information https://oss.redis.com/redisearch/master/Commands/#ftsuglen + """ # noqa return self.execute_command(SUGLEN_COMMAND, key) def sugdel(self, key, string): """ Delete a string from the AutoCompleter index. Returns 1 if the string was found and deleted, 0 otherwise. - More information `here <https://oss.redis.com/redisearch/master/Commands/#ftsugdel>`_. # noqa - """ + + For more information: https://oss.redis.com/redisearch/master/Commands/#ftsugdel + """ # noqa return self.execute_command(SUGDEL_COMMAND, key, string) def sugget( @@ -674,7 +709,6 @@ class SearchCommands: ): """ Get a list of suggestions from the AutoCompleter, for a given prefix. - More information `here <https://oss.redis.com/redisearch/master/Commands/#ftsugget>`_. # noqa Parameters: @@ -701,7 +735,9 @@ class SearchCommands: list: A list of Suggestion objects. If with_scores was False, the score of all suggestions is 1. - """ + + For more information: https://oss.redis.com/redisearch/master/Commands/#ftsugget + """ # noqa args = [SUGGET_COMMAND, key, prefix, "MAX", num] if fuzzy: args.append(FUZZY) @@ -733,7 +769,9 @@ class SearchCommands: If set to true, we do not scan and index. terms : The terms. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftsynupdate + """ # noqa cmd = [SYNUPDATE_CMD, self.index_name, groupid] if skipinitial: cmd.extend(["SKIPINITIALSCAN"]) @@ -746,6 +784,8 @@ class SearchCommands: The command is used to dump the synonyms data structure. Returns a list of synonym terms and their synonym group ids. - """ + + For more information: https://oss.redis.com/redisearch/Commands/#ftsyndump + """ # noqa raw = self.execute_command(SYNDUMP_CMD, self.index_name) return {raw[i]: raw[i + 1] for i in range(0, len(raw), 2)} diff --git a/redis/commands/timeseries/commands.py b/redis/commands/timeseries/commands.py index fcb535b..460ba76 100644 --- a/redis/commands/timeseries/commands.py +++ b/redis/commands/timeseries/commands.py @@ -26,8 +26,6 @@ class TimeSeriesCommands: def create(self, key, **kwargs): """ Create a new time-series. - For more information see - `TS.CREATE <https://oss.redis.com/redistimeseries/master/commands/#tscreate>`_. Args: @@ -60,6 +58,8 @@ class TimeSeriesCommands: - '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 """ # noqa retention_msecs = kwargs.get("retention_msecs", None) uncompressed = kwargs.get("uncompressed", False) @@ -79,9 +79,10 @@ class TimeSeriesCommands: """ Update the retention, labels of an existing key. For more information see - `TS.ALTER <https://oss.redis.com/redistimeseries/master/commands/#tsalter>`_. The parameters are the same as TS.CREATE. + + For more information: https://oss.redis.com/redistimeseries/commands/#tsalter """ # noqa retention_msecs = kwargs.get("retention_msecs", None) labels = kwargs.get("labels", {}) @@ -97,7 +98,6 @@ class TimeSeriesCommands: """ Append (or create and append) a new sample to the series. For more information see - `TS.ADD <https://oss.redis.com/redistimeseries/master/commands/#tsadd>`_. Args: @@ -129,6 +129,8 @@ class TimeSeriesCommands: - '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 """ # noqa retention_msecs = kwargs.get("retention_msecs", None) uncompressed = kwargs.get("uncompressed", False) @@ -150,8 +152,8 @@ class TimeSeriesCommands: `key` with `timestamp`. Expects a list of `tuples` as (`key`,`timestamp`, `value`). Return value is an array with timestamps of insertions. - For more information see - `TS.MADD <https://oss.redis.com/redistimeseries/master/commands/#tsmadd>`_. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsmadd """ # noqa params = [] for ktv in ktv_tuples: @@ -166,8 +168,6 @@ class TimeSeriesCommands: sample's of a series. This command can be used as a counter or gauge that automatically gets history as a time series. - For more information see - `TS.INCRBY <https://oss.redis.com/redistimeseries/master/commands/#tsincrbytsdecrby>`_. Args: @@ -189,6 +189,8 @@ class TimeSeriesCommands: 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 """ # noqa timestamp = kwargs.get("timestamp", None) retention_msecs = kwargs.get("retention_msecs", None) @@ -210,8 +212,6 @@ class TimeSeriesCommands: latest sample's of a series. This command can be used as a counter or gauge that automatically gets history as a time series. - For more information see - `TS.DECRBY <https://oss.redis.com/redistimeseries/master/commands/#tsincrbytsdecrby>`_. Args: @@ -237,6 +237,8 @@ class TimeSeriesCommands: 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 """ # noqa timestamp = kwargs.get("timestamp", None) retention_msecs = kwargs.get("retention_msecs", None) @@ -260,7 +262,6 @@ class TimeSeriesCommands: and end data points will also be deleted. Return the count for deleted items. For more information see - `TS.DEL <https://oss.redis.com/redistimeseries/master/commands/#tsdel>`_. Args: @@ -270,6 +271,8 @@ class TimeSeriesCommands: Start timestamp for the range deletion. to_time: End timestamp for the range deletion. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsdel """ # noqa return self.execute_command(DEL_CMD, key, from_time, to_time) @@ -285,8 +288,8 @@ class TimeSeriesCommands: Aggregating for `bucket_size_msec` where an `aggregation_type` can be [`avg`, `sum`, `min`, `max`, `range`, `count`, `first`, `last`, `std.p`, `std.s`, `var.p`, `var.s`] - For more information see - `TS.CREATERULE <https://oss.redis.com/redistimeseries/master/commands/#tscreaterule>`_. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tscreaterule """ # noqa params = [source_key, dest_key] self._appendAggregation(params, aggregation_type, bucket_size_msec) @@ -297,7 +300,8 @@ class TimeSeriesCommands: """ Delete a compaction rule. For more information see - `TS.DELETERULE <https://oss.redis.com/redistimeseries/master/commands/#tsdeleterule>`_. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsdeleterule """ # noqa return self.execute_command(DELETERULE_CMD, source_key, dest_key) @@ -343,8 +347,6 @@ class TimeSeriesCommands: ): """ Query a range in forward direction for a specific time-serie. - For more information see - `TS.RANGE <https://oss.redis.com/redistimeseries/master/commands/#tsrangetsrevrange>`_. Args: @@ -374,6 +376,8 @@ class TimeSeriesCommands: by_min_value). align: Timestamp for alignment control for aggregation. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsrangetsrevrange """ # noqa params = self.__range_params( key, @@ -404,8 +408,6 @@ class TimeSeriesCommands: ): """ Query a range in reverse direction for a specific time-series. - For more information see - `TS.REVRANGE <https://oss.redis.com/redistimeseries/master/commands/#tsrangetsrevrange>`_. **Note**: This command is only available since RedisTimeSeries >= v1.4 @@ -432,6 +434,8 @@ class TimeSeriesCommands: Filter result by maximum value (must mention also filter_by_min_value). align: Timestamp for alignment control for aggregation. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsrangetsrevrange """ # noqa params = self.__range_params( key, @@ -500,8 +504,6 @@ class TimeSeriesCommands: ): """ Query a range across multiple time-series by filters in forward direction. - For more information see - `TS.MRANGE <https://oss.redis.com/redistimeseries/master/commands/#tsmrangetsmrevrange>`_. Args: @@ -544,6 +546,8 @@ class TimeSeriesCommands: pair labels of a series. align: Timestamp for alignment control for aggregation. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsmrangetsmrevrange """ # noqa params = self.__mrange_params( aggregation_type, @@ -583,8 +587,6 @@ class TimeSeriesCommands: ): """ Query a range across multiple time-series by filters in reverse direction. - For more information see - `TS.MREVRANGE <https://oss.redis.com/redistimeseries/master/commands/#tsmrangetsmrevrange>`_. Args: @@ -629,6 +631,8 @@ class TimeSeriesCommands: labels of a series. align: Timestamp for alignment control for aggregation. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsmrangetsmrevrange """ # noqa params = self.__mrange_params( aggregation_type, @@ -652,14 +656,16 @@ class TimeSeriesCommands: def get(self, key): """ # noqa Get the last sample of `key`. - For more information see `TS.GET <https://oss.redis.com/redistimeseries/master/commands/#tsget>`_. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsget """ # noqa return self.execute_command(GET_CMD, key) def mget(self, filters, with_labels=False): """ # noqa Get the last samples matching the specific `filter`. - For more information see `TS.MGET <https://oss.redis.com/redistimeseries/master/commands/#tsmget>`_. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsmget """ # noqa params = [] self._appendWithLabels(params, with_labels) @@ -670,15 +676,17 @@ class TimeSeriesCommands: def info(self, key): """ # noqa Get information of `key`. - For more information see `TS.INFO <https://oss.redis.com/redistimeseries/master/commands/#tsinfo>`_. + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsinfo """ # noqa return self.execute_command(INFO_CMD, key) def queryindex(self, filters): """ # noqa Get all the keys matching the `filter` list. - For more information see `TS.QUERYINDEX <https://oss.redis.com/redistimeseries/master/commands/#tsqueryindex>`_. - """ # noqa + + For more information: https://oss.redis.com/redistimeseries/master/commands/#tsqueryindex + """ # noq return self.execute_command(QUERYINDEX_CMD, *filters) @staticmethod |