def get_app(self):
        """Get current app from Flast stack to use.

        This will allow to ensure which Redis connection to be used when
        accessing Redis connection public methods via plugin.
        """
        # First see to connection stack
        ctx = connection_stack.top
        if ctx is not None:
            return ctx.app

        # Next return app from instance cache
        if self.app is not None:
            return self.app

        # Something went wrong, in most cases app just not instantiated yet
        # and we cannot locate it
        raise RuntimeError(
            'Flask application not registered on Redis instance '
            'and no applcation bound to current context')
def get_app ( self ) : ctx = connection_stack . top if ctx is not None : return ctx . app if self . app is not None : return self . app raise RuntimeError ( 'Flask application not registered on Redis instance ' 'and no applcation bound to current context' )
Get current app from Flast stack to use.

        This will allow to ensure which Redis connection to be used when
        accessing Redis connection public methods via plugin.