def handler(self, operation=None, **kwargs):
response = self._new_response()<EOL>if operation is None:<EOL><INDENT>response.status = '<STR_LIT:error>'<EOL>response.error_type = '<STR_LIT>'<EOL>response.error_message = '<STR_LIT>'<EOL>return response<EOL><DEDENT>operation = operation.lower()<EOL>self._check_supported_op(operation, response)<EOL>if response.status == '<STR_LIT:success>':<EOL><INDENT>method = getattr(self, operation, None)<EOL>if callable(method):<EOL><INDENT>response = method(**kwargs)<EOL><DEDENT>else:<EOL><INDENT>response.status == '<STR_LIT:error>'<EOL>response.error_type = '<STR_LIT>'<EOL>msg = '<STR_LIT>'.format(operation)<EOL>response.error_message = msg<EOL><DEDENT><DEDENT>return response<EOL>
In addition to the methods described above, cruddy also provides a
generic handler interface.  This is mainly useful when you want to wrap
a cruddy handler in a Lambda function and then call that Lambda
function to access the CRUD capabilities.

To call the handler, you simply put all necessary parameters into a
Python dictionary and then call the handler with that dict.

```
params = {
    'operation': 'create',
    'item': {'foo': 'bar', 'fie': 'baz'}
}
response = crud.handler(**params)
```