@@ -373,7 +373,7 @@ def client_list(self, _type=None, client_id=[]):
373
373
return self .execute_command ('CLIENT LIST' , * args )
374
374
375
375
def client_getname (self ):
376
- "Returns the current connection name"
376
+ """ Returns the current connection name"" "
377
377
return self .execute_command ('CLIENT GETNAME' )
378
378
379
379
def client_reply (self , reply ):
@@ -396,11 +396,12 @@ def client_reply(self, reply):
396
396
return self .execute_command ("CLIENT REPLY" , reply )
397
397
398
398
def client_id (self ):
399
- "Returns the current connection id"
399
+ """ Returns the current connection id"" "
400
400
return self .execute_command ('CLIENT ID' )
401
401
402
402
def client_trackinginfo (self ):
403
- """Returns the information about the current client connection's
403
+ """
404
+ Returns the information about the current client connection's
404
405
use of the server assisted client side cache.
405
406
See https://redis.io/commands/client-trackinginfo
406
407
"""
@@ -438,39 +439,45 @@ def client_unpause(self):
438
439
return self .execute_command ('CLIENT UNPAUSE' )
439
440
440
441
def readwrite (self ):
441
- "Disables read queries for a connection to a Redis Cluster slave node"
442
+ """
443
+ Disables read queries for a connection to a Redis Cluster slave node.
444
+ """
442
445
return self .execute_command ('READWRITE' )
443
446
444
447
def readonly (self ):
445
- "Enables read queries for a connection to a Redis Cluster replica node"
448
+ """
449
+ Enables read queries for a connection to a Redis Cluster replica node.
450
+ """
446
451
return self .execute_command ('READONLY' )
447
452
448
453
def config_get (self , pattern = "*" ):
449
- "Return a dictionary of configuration based on the ``pattern``"
454
+ """ Return a dictionary of configuration based on the ``pattern``"" "
450
455
return self .execute_command ('CONFIG GET' , pattern )
451
456
452
457
def config_set (self , name , value ):
453
458
"Set config item ``name`` with ``value``"
454
459
return self .execute_command ('CONFIG SET' , name , value )
455
460
456
461
def config_resetstat (self ):
457
- "Reset runtime statistics"
462
+ """ Reset runtime statistics"" "
458
463
return self .execute_command ('CONFIG RESETSTAT' )
459
464
460
465
def config_rewrite (self ):
461
- "Rewrite config file with the minimal change to reflect running config"
466
+ """
467
+ Rewrite config file with the minimal change to reflect running config.
468
+ """
462
469
return self .execute_command ('CONFIG REWRITE' )
463
470
464
471
def dbsize (self ):
465
- "Returns the number of keys in the current database"
472
+ """ Returns the number of keys in the current database"" "
466
473
return self .execute_command ('DBSIZE' )
467
474
468
475
def debug_object (self , key ):
469
- "Returns version specific meta information about a given key"
476
+ """ Returns version specific meta information about a given key"" "
470
477
return self .execute_command ('DEBUG OBJECT' , key )
471
478
472
479
def echo (self , value ):
473
- "Echo the string back from the server"
480
+ """ Echo the string back from the server"" "
474
481
return self .execute_command ('ECHO' , value )
475
482
476
483
def flushall (self , asynchronous = False ):
@@ -524,7 +531,8 @@ def lastsave(self):
524
531
return self .execute_command ('LASTSAVE' )
525
532
526
533
def lolwut (self , * version_numbers ):
527
- """Get the Redis version and a piece of generative computer art
534
+ """
535
+ Get the Redis version and a piece of generative computer art
528
536
See: https://redis.io/commands/lolwut
529
537
"""
530
538
if version_numbers :
@@ -568,11 +576,21 @@ def migrate(self, host, port, keys, destination_db, timeout,
568
576
timeout , * pieces )
569
577
570
578
def object (self , infotype , key ):
571
- "Return the encoding, idletime, or refcount about the key"
579
+ """ Return the encoding, idletime, or refcount about the key"" "
572
580
return self .execute_command ('OBJECT' , infotype , key , infotype = infotype )
573
581
582
+ def memory_doctor (self ):
583
+ raise NotImplementedError (
584
+ "MEMORY DOCTOR is intentionally not implemented in the client."
585
+ )
586
+
587
+ def memory_help (self ):
588
+ raise NotImplementedError (
589
+ "MEMORY HELP is intentionally not implemented in the client."
590
+ )
591
+
574
592
def memory_stats (self ):
575
- "Return a dictionary of memory stats"
593
+ """ Return a dictionary of memory stats"" "
576
594
return self .execute_command ('MEMORY STATS' )
577
595
578
596
def memory_usage (self , key , samples = None ):
@@ -590,15 +608,16 @@ def memory_usage(self, key, samples=None):
590
608
return self .execute_command ('MEMORY USAGE' , key , * args )
591
609
592
610
def memory_purge (self ):
593
- "Attempts to purge dirty pages for reclamation by allocator"
611
+ """ Attempts to purge dirty pages for reclamation by allocator"" "
594
612
return self .execute_command ('MEMORY PURGE' )
595
613
596
614
def ping (self ):
597
- "Ping the Redis server"
615
+ """ Ping the Redis server"" "
598
616
return self .execute_command ('PING' )
599
617
600
618
def quit (self ):
601
- """Ask the server to close the connection.
619
+ """
620
+ Ask the server to close the connection.
602
621
https://redis.io/commands/quit
603
622
"""
604
623
return self .execute_command ('QUIT' )
0 commit comments