Skip to content

Commit 428510b

Browse files
authored
Fix modules links to https://redis.io/commands/ (#2185)
1 parent a53bc0c commit 428510b

File tree

5 files changed

+96
-104
lines changed

5 files changed

+96
-104
lines changed

redis/commands/bf/commands.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def create(
174174
):
175175
"""
176176
Create a new Cuckoo Filter `key` an initial `capacity` items.
177-
For more information see `CF.RESERVE <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfreserve>`_.
177+
For more information see `CF.RESERVE <https://redis.io/commands/cf.reserve>`_.
178178
""" # noqa
179179
params = [key, capacity]
180180
self.append_expansion(params, expansion)
@@ -185,7 +185,7 @@ def create(
185185
def add(self, key, item):
186186
"""
187187
Add an `item` to a Cuckoo Filter `key`.
188-
For more information see `CF.ADD <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfadd>`_.
188+
For more information see `CF.ADD <https://redis.io/commands/cf.add>`_.
189189
""" # noqa
190190
params = [key, item]
191191
return self.execute_command(CF_ADD, *params)
@@ -194,7 +194,7 @@ def addnx(self, key, item):
194194
"""
195195
Add an `item` to a Cuckoo Filter `key` only if item does not yet exist.
196196
Command might be slower that `add`.
197-
For more information see `CF.ADDNX <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfaddnx>`_.
197+
For more information see `CF.ADDNX <https://redis.io/commands/cf.addnx>`_.
198198
""" # noqa
199199
params = [key, item]
200200
return self.execute_command(CF_ADDNX, *params)
@@ -204,7 +204,7 @@ def insert(self, key, items, capacity=None, nocreate=None):
204204
Add multiple `items` to a Cuckoo Filter `key`, allowing the filter
205205
to be created with a custom `capacity` if it does not yet exist.
206206
`items` must be provided as a list.
207-
For more information see `CF.INSERT <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfinsert>`_.
207+
For more information see `CF.INSERT <https://redis.io/commands/cf.insert>`_.
208208
""" # noqa
209209
params = [key]
210210
self.append_capacity(params, capacity)
@@ -217,7 +217,7 @@ def insertnx(self, key, items, capacity=None, nocreate=None):
217217
Add multiple `items` to a Cuckoo Filter `key` only if they do not exist yet,
218218
allowing the filter to be created with a custom `capacity` if it does not yet exist.
219219
`items` must be provided as a list.
220-
For more information see `CF.INSERTNX <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfinsertnx>`_.
220+
For more information see `CF.INSERTNX <https://redis.io/commands/cf.insertnx>`_.
221221
""" # noqa
222222
params = [key]
223223
self.append_capacity(params, capacity)
@@ -228,23 +228,23 @@ def insertnx(self, key, items, capacity=None, nocreate=None):
228228
def exists(self, key, item):
229229
"""
230230
Check whether an `item` exists in Cuckoo Filter `key`.
231-
For more information see `CF.EXISTS <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfexists>`_.
231+
For more information see `CF.EXISTS <https://redis.io/commands/cf.exists>`_.
232232
""" # noqa
233233
params = [key, item]
234234
return self.execute_command(CF_EXISTS, *params)
235235

236236
def delete(self, key, item):
237237
"""
238238
Delete `item` from `key`.
239-
For more information see `CF.DEL <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfdel>`_.
239+
For more information see `CF.DEL <https://redis.io/commands/cf.del>`_.
240240
""" # noqa
241241
params = [key, item]
242242
return self.execute_command(CF_DEL, *params)
243243

244244
def count(self, key, item):
245245
"""
246246
Return the number of times an `item` may be in the `key`.
247-
For more information see `CF.COUNT <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfcount>`_.
247+
For more information see `CF.COUNT <https://redis.io/commands/cf.count>`_.
248248
""" # noqa
249249
params = [key, item]
250250
return self.execute_command(CF_COUNT, *params)
@@ -258,7 +258,7 @@ def scandump(self, key, iter):
258258
The first time this command is called, the value of `iter` should be 0.
259259
This command will return successive (iter, data) pairs until
260260
(0, NULL) to indicate completion.
261-
For more information see `CF.SCANDUMP <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfscandump>`_.
261+
For more information see `CF.SCANDUMP <https://redis.io/commands/cf.scandump>`_.
262262
""" # noqa
263263
params = [key, iter]
264264
return self.execute_command(CF_SCANDUMP, *params)
@@ -269,7 +269,7 @@ def loadchunk(self, key, iter, data):
269269

270270
This command will overwrite any Cuckoo filter stored under key.
271271
Ensure that the Cuckoo filter will not be modified between invocations.
272-
For more information see `CF.LOADCHUNK <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfloadchunk>`_.
272+
For more information see `CF.LOADCHUNK <https://redis.io/commands/cf.loadchunk>`_.
273273
""" # noqa
274274
params = [key, iter, data]
275275
return self.execute_command(CF_LOADCHUNK, *params)
@@ -278,7 +278,7 @@ def info(self, key):
278278
"""
279279
Return size, number of buckets, number of filter, number of items inserted,
280280
number of items deleted, bucket size, expansion rate, and max iteration.
281-
For more information see `CF.INFO <https://oss.redis.com/redisbloom/master/Cuckoo_Commands/#cfinfo>`_.
281+
For more information see `CF.INFO <https://redis.io/commands/cf.info>`_.
282282
""" # noqa
283283
return self.execute_command(CF_INFO, key)
284284

@@ -290,15 +290,15 @@ def reserve(self, key, k, width, depth, decay):
290290
"""
291291
Create a new Top-K Filter `key` with desired probability of false
292292
positives `errorRate` expected entries to be inserted as `size`.
293-
For more information see `TOPK.RESERVE <https://oss.redis.com/redisbloom/master/TopK_Commands/#topkreserve>`_.
293+
For more information see `TOPK.RESERVE <https://redis.io/commands/topk.reserve>`_.
294294
""" # noqa
295295
params = [key, k, width, depth, decay]
296296
return self.execute_command(TOPK_RESERVE, *params)
297297

298298
def add(self, key, *items):
299299
"""
300300
Add one `item` or more to a Top-K Filter `key`.
301-
For more information see `TOPK.ADD <https://oss.redis.com/redisbloom/master/TopK_Commands/#topkadd>`_.
301+
For more information see `TOPK.ADD <https://redis.io/commands/topk.add>`_.
302302
""" # noqa
303303
params = [key]
304304
params += items
@@ -308,7 +308,7 @@ def incrby(self, key, items, increments):
308308
"""
309309
Add/increase `items` to a Top-K Sketch `key` by ''increments''.
310310
Both `items` and `increments` are lists.
311-
For more information see `TOPK.INCRBY <https://oss.redis.com/redisbloom/master/TopK_Commands/#topkincrby>`_.
311+
For more information see `TOPK.INCRBY <https://redis.io/commands/topk.incrby>`_.
312312

313313
Example:
314314

@@ -321,7 +321,7 @@ def incrby(self, key, items, increments):
321321
def query(self, key, *items):
322322
"""
323323
Check whether one `item` or more is a Top-K item at `key`.
324-
For more information see `TOPK.QUERY <https://oss.redis.com/redisbloom/master/TopK_Commands/#topkquery>`_.
324+
For more information see `TOPK.QUERY <https://redis.io/commands/topk.query>`_.
325325
""" # noqa
326326
params = [key]
327327
params += items
@@ -330,7 +330,7 @@ def query(self, key, *items):
330330
def count(self, key, *items):
331331
"""
332332
Return count for one `item` or more from `key`.
333-
For more information see `TOPK.COUNT <https://oss.redis.com/redisbloom/master/TopK_Commands/#topkcount>`_.
333+
For more information see `TOPK.COUNT <https://redis.io/commands/topk.count>`_.
334334
""" # noqa
335335
params = [key]
336336
params += items
@@ -341,7 +341,7 @@ def list(self, key, withcount=False):
341341
Return full list of items in Top-K list of `key`.
342342
If `withcount` set to True, return full list of items
343343
with probabilistic count in Top-K list of `key`.
344-
For more information see `TOPK.LIST <https://oss.redis.com/redisbloom/master/TopK_Commands/#topklist>`_.
344+
For more information see `TOPK.LIST <https://redis.io/commands/topk.list>`_.
345345
""" # noqa
346346
params = [key]
347347
if withcount:
@@ -351,7 +351,7 @@ def list(self, key, withcount=False):
351351
def info(self, key):
352352
"""
353353
Return k, width, depth and decay values of `key`.
354-
For more information see `TOPK.INFO <https://oss.redis.com/redisbloom/master/TopK_Commands/#topkinfo>`_.
354+
For more information see `TOPK.INFO <https://redis.io/commands/topk.info>`_.
355355
""" # noqa
356356
return self.execute_command(TOPK_INFO, key)
357357

@@ -360,23 +360,23 @@ class TDigestCommands:
360360
def create(self, key, compression):
361361
"""
362362
Allocate the memory and initialize the t-digest.
363-
For more information see `TDIGEST.CREATE <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestcreate>`_.
363+
For more information see `TDIGEST.CREATE <https://redis.io/commands/tdigest.create>`_.
364364
""" # noqa
365365
params = [key, compression]
366366
return self.execute_command(TDIGEST_CREATE, *params)
367367

368368
def reset(self, key):
369369
"""
370370
Reset the sketch `key` to zero - empty out the sketch and re-initialize it.
371-
For more information see `TDIGEST.RESET <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestreset>`_.
371+
For more information see `TDIGEST.RESET <https://redis.io/commands/tdigest.reset>`_.
372372
""" # noqa
373373
return self.execute_command(TDIGEST_RESET, key)
374374

375375
def add(self, key, values, weights):
376376
"""
377377
Add one or more samples (value with weight) to a sketch `key`.
378378
Both `values` and `weights` are lists.
379-
For more information see `TDIGEST.ADD <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestadd>`_.
379+
For more information see `TDIGEST.ADD <https://redis.io/commands/tdigest.add>`_.
380380

381381
Example:
382382

@@ -389,38 +389,38 @@ def add(self, key, values, weights):
389389
def merge(self, toKey, fromKey):
390390
"""
391391
Merge all of the values from 'fromKey' to 'toKey' sketch.
392-
For more information see `TDIGEST.MERGE <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestmerge>`_.
392+
For more information see `TDIGEST.MERGE <https://redis.io/commands/tdigest.merge>`_.
393393
""" # noqa
394394
params = [toKey, fromKey]
395395
return self.execute_command(TDIGEST_MERGE, *params)
396396

397397
def min(self, key):
398398
"""
399399
Return minimum value from the sketch `key`. Will return DBL_MAX if the sketch is empty.
400-
For more information see `TDIGEST.MIN <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestmin>`_.
400+
For more information see `TDIGEST.MIN <https://redis.io/commands/tdigest.min>`_.
401401
""" # noqa
402402
return self.execute_command(TDIGEST_MIN, key)
403403

404404
def max(self, key):
405405
"""
406406
Return maximum value from the sketch `key`. Will return DBL_MIN if the sketch is empty.
407-
For more information see `TDIGEST.MAX <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestmax>`_.
407+
For more information see `TDIGEST.MAX <https://redis.io/commands/tdigest.max>`_.
408408
""" # noqa
409409
return self.execute_command(TDIGEST_MAX, key)
410410

411411
def quantile(self, key, quantile):
412412
"""
413413
Return double value estimate of the cutoff such that a specified fraction of the data
414414
added to this TDigest would be less than or equal to the cutoff.
415-
For more information see `TDIGEST.QUANTILE <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestquantile>`_.
415+
For more information see `TDIGEST.QUANTILE <https://redis.io/commands/tdigest.quantile>`_.
416416
""" # noqa
417417
params = [key, quantile]
418418
return self.execute_command(TDIGEST_QUANTILE, *params)
419419

420420
def cdf(self, key, value):
421421
"""
422422
Return double fraction of all points added which are <= value.
423-
For more information see `TDIGEST.CDF <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestcdf>`_.
423+
For more information see `TDIGEST.CDF <https://redis.io/commands/tdigest.cdf>`_.
424424
""" # noqa
425425
params = [key, value]
426426
return self.execute_command(TDIGEST_CDF, *params)
@@ -429,7 +429,7 @@ def info(self, key):
429429
"""
430430
Return Compression, Capacity, Merged Nodes, Unmerged Nodes, Merged Weight, Unmerged Weight
431431
and Total Compressions.
432-
For more information see `TDIGEST.INFO <https://oss.redis.com/redisbloom/master/TDigest_Commands/#tdigestinfo>`_.
432+
For more information see `TDIGEST.INFO <https://redis.io/commands/tdigest.info>`_.
433433
""" # noqa
434434
return self.execute_command(TDIGEST_INFO, key)
435435

@@ -441,15 +441,15 @@ class CMSCommands:
441441
def initbydim(self, key, width, depth):
442442
"""
443443
Initialize a Count-Min Sketch `key` to dimensions (`width`, `depth`) specified by user.
444-
For more information see `CMS.INITBYDIM <https://oss.redis.com/redisbloom/master/CountMinSketch_Commands/#cmsinitbydim>`_.
444+
For more information see `CMS.INITBYDIM <https://redis.io/commands/cms.initbydim>`_.
445445
""" # noqa
446446
params = [key, width, depth]
447447
return self.execute_command(CMS_INITBYDIM, *params)
448448

449449
def initbyprob(self, key, error, probability):
450450
"""
451451
Initialize a Count-Min Sketch `key` to characteristics (`error`, `probability`) specified by user.
452-
For more information see `CMS.INITBYPROB <https://oss.redis.com/redisbloom/master/CountMinSketch_Commands/#cmsinitbyprob>`_.
452+
For more information see `CMS.INITBYPROB <https://redis.io/commands/cms.initbyprob>`_.
453453
""" # noqa
454454
params = [key, error, probability]
455455
return self.execute_command(CMS_INITBYPROB, *params)
@@ -458,7 +458,7 @@ def incrby(self, key, items, increments):
458458
"""
459459
Add/increase `items` to a Count-Min Sketch `key` by ''increments''.
460460
Both `items` and `increments` are lists.
461-
For more information see `CMS.INCRBY <https://oss.redis.com/redisbloom/master/CountMinSketch_Commands/#cmsincrby>`_.
461+
For more information see `CMS.INCRBY <https://redis.io/commands/cms.incrby>`_.
462462

463463
Example:
464464

@@ -471,7 +471,7 @@ def incrby(self, key, items, increments):
471471
def query(self, key, *items):
472472
"""
473473
Return count for an `item` from `key`. Multiple items can be queried with one call.
474-
For more information see `CMS.QUERY <https://oss.redis.com/redisbloom/master/CountMinSketch_Commands/#cmsquery>`_.
474+
For more information see `CMS.QUERY <https://redis.io/commands/cms.query>`_.
475475
""" # noqa
476476
params = [key]
477477
params += items
@@ -483,7 +483,7 @@ def merge(self, destKey, numKeys, srcKeys, weights=[]):
483483
All sketches must have identical width and depth.
484484
`Weights` can be used to multiply certain sketches. Default weight is 1.
485485
Both `srcKeys` and `weights` are lists.
486-
For more information see `CMS.MERGE <https://oss.redis.com/redisbloom/master/CountMinSketch_Commands/#cmsmerge>`_.
486+
For more information see `CMS.MERGE <https://redis.io/commands/cms.merge>`_.
487487
""" # noqa
488488
params = [destKey, numKeys]
489489
params += srcKeys
@@ -493,6 +493,6 @@ def merge(self, destKey, numKeys, srcKeys, weights=[]):
493493
def info(self, key):
494494
"""
495495
Return width, depth and total count of the sketch.
496-
For more information see `CMS.INFO <https://oss.redis.com/redisbloom/master/CountMinSketch_Commands/#cmsinfo>`_.
496+
For more information see `CMS.INFO <https://redis.io/commands/cms.info>`_.
497497
""" # noqa
498498
return self.execute_command(CMS_INFO, key)

redis/commands/graph/commands.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class GraphCommands:
1212
def commit(self):
1313
"""
1414
Create entire graph.
15-
For more information see `CREATE <https://oss.redis.com/redisgraph/master/commands/#create>`_. # noqa
1615
"""
1716
if len(self.nodes) == 0 and len(self.edges) == 0:
1817
return None
@@ -32,7 +31,7 @@ def commit(self):
3231
def query(self, q, params=None, timeout=None, read_only=False, profile=False):
3332
"""
3433
Executes a query against the graph.
35-
For more information see `GRAPH.QUERY <https://oss.redis.com/redisgraph/master/commands/#graphquery>`_. # noqa
34+
For more information see `GRAPH.QUERY <https://redis.io/commands/graph.query>`_. # noqa
3635

3736
Args:
3837

@@ -95,7 +94,6 @@ def query(self, q, params=None, timeout=None, read_only=False, profile=False):
9594
def merge(self, pattern):
9695
"""
9796
Merge pattern.
98-
For more information see `MERGE <https://oss.redis.com/redisgraph/master/commands/#merge>`_. # noqa
9997
"""
10098
query = "MERGE "
10199
query += str(pattern)
@@ -105,7 +103,7 @@ def merge(self, pattern):
105103
def delete(self):
106104
"""
107105
Deletes graph.
108-
For more information see `DELETE <https://oss.redis.com/redisgraph/master/commands/#delete>`_. # noqa
106+
For more information see `DELETE <https://redis.io/commands/graph.delete>`_. # noqa
109107
"""
110108
self._clear_schema()
111109
return self.execute_command("GRAPH.DELETE", self.name)
@@ -132,15 +130,15 @@ def profile(self, query):
132130
for each operation's execution. Return a string representation of a
133131
query execution plan, with details on results produced by and time
134132
spent in each operation.
135-
For more information see `GRAPH.PROFILE <https://oss.redis.com/redisgraph/master/commands/#graphprofile>`_. # noqa
133+
For more information see `GRAPH.PROFILE <https://redis.io/commands/graph.profile>`_. # noqa
136134
"""
137135
return self.query(query, profile=True)
138136

139137
def slowlog(self):
140138
"""
141139
Get a list containing up to 10 of the slowest queries issued
142140
against the given graph ID.
143-
For more information see `GRAPH.SLOWLOG <https://oss.redis.com/redisgraph/master/commands/#graphslowlog>`_. # noqa
141+
For more information see `GRAPH.SLOWLOG <https://redis.io/commands/graph.slowlog>`_. # noqa
144142

145143
Each item in the list has the following structure:
146144
1. A unix timestamp at which the log entry was processed.
@@ -153,7 +151,7 @@ def slowlog(self):
153151
def config(self, name, value=None, set=False):
154152
"""
155153
Retrieve or update a RedisGraph configuration.
156-
For more information see `GRAPH.CONFIG <https://oss.redis.com/redisgraph/master/commands/#graphconfig>`_. # noqa
154+
For more information see `https://redis.io/commands/graph.config-get/>`_. # noqa
157155

158156
Args:
159157

@@ -177,7 +175,7 @@ def config(self, name, value=None, set=False):
177175
def list_keys(self):
178176
"""
179177
Lists all graph keys in the keyspace.
180-
For more information see `GRAPH.LIST <https://oss.redis.com/redisgraph/master/commands/#graphlist>`_. # noqa
178+
For more information see `GRAPH.LIST <https://redis.io/commands/graph.list>`_. # noqa
181179
"""
182180
return self.execute_command("GRAPH.LIST")
183181

@@ -202,6 +200,7 @@ def explain(self, query, params=None):
202200
"""
203201
Get the execution plan for given query,
204202
GRAPH.EXPLAIN returns ExecutionPlan object.
203+
For more information see `GRAPH.EXPLAIN <https://redis.io/commands/graph.explain>`_. # noqa
205204

206205
Args:
207206
query: the query that will be executed

0 commit comments

Comments
 (0)