def __init__(self, **kw): self._decorators = kw.pop('decorators', [timeit, incr_count, send_mozsvc_data]) # To work properly with venusian, we have to specify the number of # frames between the call to venusian.attach and the definition of # the attached function. Cornice defaults to 1, and we add another. kw.setdefault('depth', 2) Service.__init__(self, **kw)
def __init__(self, name=None, path=None, description=None, cors_policy=None, depth=0, **kwargs): name = name or self.__class__.__name__.lower() CorniceService.__init__( self, name=name, path=path or '/{}'.format(name), description=description or 'service for {}'.format(path), cors_policy=cors_policy, depth=depth + 2, validators=self.validate, **kwargs ) self.post()(self.receive)
def __init__(self, **kw): self._decorators = kw.pop('decorators', [timeit, incr_count, send_mozsvc_data]) Service.__init__(self, **kw)
def __init__(self,name,path,description,**kw): Service.__init__(self, name='users', path='/users', description="User registration", depth=2,**kw) pass
def __init__(self, **kw): Service.__init__(self, **kw) self._decorators = set()