[docs]classWuttaCoreposAppProvider(AppProvider):""" The :term:`app provider` for Wutta-COREPOS. This adds the :meth:`get_corepos_handler()` method for the :term:`app handler`. """
[docs]defget_corepos_handler(self,**kwargs):""" Get the configured CORE-POS integration handler. :rtype: :class:`~wutta_corepos.handler.CoreposHandler` """ifnothasattr(self,'corepos_handler'):spec=self.config.get(f'{self.appname}.corepos_handler',default='wutta_corepos.handler:CoreposHandler')factory=self.app.load_object(spec)self.corepos_handler=factory(self.config,**kwargs)returnself.corepos_handler