is_protected_type(obj) [source] Determine if the object instance is of a protected type. Objects of protected types are preserved as-is when passed to force_text(strings_only=True).
python_2_unicode_compatible() [source] A decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing. To support Python 2 and 3 with a single code base, define a __str__ method returning text and apply this decorator to the class.
smart_bytes(s, encoding='utf-8', strings_only=False, errors='strict') [source] Returns a bytestring version of s, encoded as specified in encoding. If strings_only is True, don’t convert (some) non-string-like objects.
smart_str(s, encoding='utf-8', strings_only=False, errors='strict') Alias of smart_bytes() on Python 2 and smart_text() on Python 3. This function returns a str or a lazy string. For instance, this is suitable for writing to sys.stdout on Python 2 and 3.
smart_text(s, encoding='utf-8', strings_only=False, errors='strict') [source] Returns a text object representing s – unicode on Python 2 and str on Python 3. Treats bytestrings using the encoding codec. If strings_only is True, don’t convert (some) non-string-like objects.
smart_unicode(s, encoding='utf-8', strings_only=False, errors='strict') Historical name of smart_text(). Only available under Python 2.
uri_to_iri(uri) [source] Converts a Uniform Resource Identifier into an Internationalized Resource Identifier. This is an algorithm from section 3.2 of RFC 3987#section-3.2. Takes a URI in ASCII bytes and returns a unicode string containing the encoded result.
class Atom1Feed(SyndicationFeed) [source] Spec: https://tools.ietf.org/html/rfc4287
class Enclosure [source] Represents an RSS enclosure
get_tag_uri(url, date) [source] Creates a TagURI. See https://web.archive.org/web/20110514113830/http://diveintomark.org/archives/2004/05/28/howto-atom-id
Page 4532 of 11844