(cls, iri_string, encoding='utf-8')
return cls(
            split_iri['scheme'], split_iri['authority'],
            normalizers.encode_component(split_iri['path'], encoding),
            normalizers.encode_component(split_iri['query'], encoding),
            normalizers.encode_component(split_iri['fragment'], encoding),
            encoding,
        )
Parse a IRI reference from the given unicode IRI string.

        :param str iri_string: Unicode IRI to be parsed into a reference.
        :param str encoding: The encoding of the string provided
        :returns: :class:`IRIReference` or subclass thereof
Parse a IRI reference from the given unicode IRI string.
Parse a IRI reference from the given unicode IRI string .
def from_string(cls, iri_string, encoding='utf-8'):
        """Parse a IRI reference from the given unicode IRI string.

        :param str iri_string: Unicode IRI to be parsed into a reference.
        :param str encoding: The encoding of the string provided
        :returns: :class:`IRIReference` or subclass thereof
        """
        iri_string = compat.to_str(iri_string, encoding)

        split_iri = misc.IRI_MATCHER.match(iri_string).groupdict()
        return cls(
            split_iri['scheme'], split_iri['authority'],
            normalizers.encode_component(split_iri['path'], encoding),
            normalizers.encode_component(split_iri['query'], encoding),
            normalizers.encode_component(split_iri['fragment'], encoding),
            encoding,
        )
def from_string ( cls , iri_string , encoding = 'utf-8' ) : iri_string = compat . to_str ( iri_string , encoding ) split_iri = misc . IRI_MATCHER . match ( iri_string ) . groupdict ( ) return cls ( split_iri [ 'scheme' ] , split_iri [ 'authority' ] , normalizers . encode_component ( split_iri [ 'path' ] , encoding ) , normalizers . encode_component ( split_iri [ 'query' ] , encoding ) , normalizers . encode_component ( split_iri [ 'fragment' ] , encoding ) , encoding , )