def init(self, app):
        """
        Initialise from flask app
        This gets configuration values from a flask application.
        :param app: flask.Flask
        :return: boiler.user.user_servce.UserService
        """
        cfg = app.config
        self.welcome_message = cfg.get('USER_SEND_WELCOME_MESSAGE')
        self.require_confirmation = cfg.get(
            'USER_ACCOUNTS_REQUIRE_CONFIRMATION'
        )

        subjects = cfg.get('USER_EMAIL_SUBJECTS')
        self.email_subjects = subjects if subjects else dict()

        self.jwt_secret = cfg.get('USER_JWT_SECRET')
        self.jwt_algo = cfg.get('USER_JWT_ALGO')
        self.jwt_lifetime = cfg.get('USER_JWT_LIFETIME_SECONDS')
        self.jwt_implementation = cfg.get('USER_JWT_IMPLEMENTATION')
        self.jwt_loader_implementation = cfg.get(
            'USER_JWT_LOADER_IMPLEMENTATION'
        )
def init ( self , app ) : cfg = app . config self . welcome_message = cfg . get ( 'USER_SEND_WELCOME_MESSAGE' ) self . require_confirmation = cfg . get ( 'USER_ACCOUNTS_REQUIRE_CONFIRMATION' ) subjects = cfg . get ( 'USER_EMAIL_SUBJECTS' ) self . email_subjects = subjects if subjects else dict ( ) self . jwt_secret = cfg . get ( 'USER_JWT_SECRET' ) self . jwt_algo = cfg . get ( 'USER_JWT_ALGO' ) self . jwt_lifetime = cfg . get ( 'USER_JWT_LIFETIME_SECONDS' ) self . jwt_implementation = cfg . get ( 'USER_JWT_IMPLEMENTATION' ) self . jwt_loader_implementation = cfg . get ( 'USER_JWT_LOADER_IMPLEMENTATION' )
Initialise from flask app
        This gets configuration values from a flask application.
        :param app: flask.Flask
        :return: boiler.user.user_servce.UserService