def __init__(self, response_template=None, response_attribute_filter_default_value=False,<EOL>parameter_sets=None, body_template=None, request_attribute_filter=None):
from prestans.parser import AttributeFilter<EOL>from prestans.parser import ParameterSet<EOL>self._response_attribute_filter_template = None<EOL>if response_template is not None and(not isinstance(response_template, DataCollection) and not isinstance(response_template, BinaryResponse)):<EOL><INDENT>raise TypeError("<STR_LIT>" % response_template.__class__.__name__)<EOL><DEDENT>if response_template is not None and isinstance(response_template, DataCollection):<EOL><INDENT>self.response_attribute_filter_template = AttributeFilter.from_model(<EOL>model_instance=response_template,<EOL>default_value=response_attribute_filter_default_value<EOL>)<EOL><DEDENT>else:<EOL><INDENT>self.response_attribute_filter_template = None<EOL><DEDENT>self._response_template = response_template<EOL>if parameter_sets is not None and not isinstance(parameter_sets, list):<EOL><INDENT>parameter_sets = [parameter_sets]<EOL><DEDENT>if isinstance(parameter_sets, list):<EOL><INDENT>for parameter_set in parameter_sets:<EOL><INDENT>if not isinstance(parameter_set, ParameterSet):<EOL><INDENT>raise TypeError("<STR_LIT>" % parameter_set.__class__.__name__)<EOL><DEDENT><DEDENT>self._parameter_sets = parameter_sets<EOL><DEDENT>else:<EOL><INDENT>self._parameter_sets = list()<EOL><DEDENT>if body_template is not None and notisinstance(body_template, DataCollection):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>" % body_template.__class__.__name__)<EOL><DEDENT>self._body_template = body_template<EOL>if request_attribute_filter is not None andnot isinstance(request_attribute_filter, AttributeFilter):<EOL><INDENT>raise TypeError("<STR_LIT>" % request_attribute_filter.__class__.__name__)<EOL><DEDENT>self._request_attribute_filter = request_attribute_filter<EOL>
Each handler has a meta attribute called __verb_config__ this must be an instance
of prestans.parser.Config which accepts six named parameters one for each supported
HTTP verb (HEAD, GET, POST, PUT, DELETE, PATCH) each one of which must be an
instance of prestans.parser.VerbConfig. A VerbConfig accepts the following named
parameters (not all of them are supported across all HTTP verbs):

* response_template an instance of a prestans.types.DataCollection subclass
  i.e a Model or an Array of Prestans DataType. This is what Prestans will use
  to validate the response your handler sends back to the client.
* response_attribute_filter_default_value Prestans automatically creates an
  attribute filter based on the response_template by default Prestans exposes
  all it's attributes in the response, setting this to False will hide all
  attributes be default. Your handler code is responsible for toggling
  visibility in either instance.
* parameter_sets an array of prestans.parser.ParameterSet instances
* body_template an instance of a prestans.types.DataCollection subclass i.e
  a Model or an Array of Prestans DataType, this is what Prestans will use
  to validate the request sent to your handler. If validation of the incoming
  data fails, Prestans will not execute the associated verb in your handler.
* request_attribute_filter is an attribute filter used to relax or tighten
  rules for the incoming data. This is particularly useful if you want
  to use portions of a model. Particularly useful for UPDATE requests.