def render_data_uri(self, **kwargs):
        """Output a base 64 encoded data uri"""
        # Force protocol as data uri have none
        kwargs.setdefault('force_uri_protocol', 'https')
        return "data:image/svg+xml;charset=utf-8;base64,%s" % (
            base64.b64encode(self.render(**kwargs)
                             ).decode('utf-8').replace('\n', '')
        )
def render_data_uri ( self , ** kwargs ) : kwargs . setdefault ( 'force_uri_protocol' , 'https' ) return "data:image/svg+xml;charset=utf-8;base64,%s" % ( base64 . b64encode ( self . render ( ** kwargs ) ) . decode ( 'utf-8' ) . replace ( '\n' , '' ) )
Output a base 64 encoded data uri