# ``twisted`.`protocols`.`memcache`.`Command``

class documentation

`class Command: (source)`

View In Hierarchy

Wrap a client action into an object, that holds the values used in the protocol.

Method | `__init__` | Create a command.
Method | `fail` | Make the underlying deferred fails.
Method | `success` | Shortcut method to fire the underlying deferred.
Instance Variable | `command` | name of the command sent to the server.
Instance Variable | `_deferred` | the `Deferred` object that will be fired when the result arrives.

def __init__(self, command, **kwargs): (source)
Create a command.

Parameters
command:`bytes` | the name of the command.
**kwargs | this values will be stored as attributes of the object for future use

def fail(self, error): (source)
Make the underlying deferred fails.
def success(self, value): (source)
Shortcut method to fire the underlying deferred.
command: `bytes` = (source)
name of the command sent to the server.
_deferred: `Deferred` = (source)
the `Deferred` object that will be fired when the result arrives.