Example #1
0
 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)
Example #2
0
 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)
Example #3
0
    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)
Example #4
0
 def __init__(self, **kw):
     self._decorators = kw.pop('decorators', [timeit, incr_count,
                                              send_mozsvc_data])
     Service.__init__(self, **kw)
Example #5
0
	def __init__(self,name,path,description,**kw):
		Service.__init__(self, name='users', path='/users', description="User registration", depth=2,**kw)
		pass
Example #6
0
 def __init__(self, **kw):
     Service.__init__(self, **kw)
     self._decorators = set()