PyDocs

Internet Data Handling

email.utils

Miscellaneous utilities.
Symbols in email.utils

c

collapse_rfc2231_value
When a header parameter is encoded in RFC 2231 format, Message.get_param() may return a 3-tuple containing the character set, language, and value.

d

decode_params
Decode parameters list according to RFC 2231.
decode_rfc2231
Decode string according to RFC 2231

e

encode_rfc2231
Encode string according to RFC 2231.

f

format_datetime
Turn a datetime into a date string as specified in RFC 2822.
formataddr
The inverse of parseaddr(), this takes a 2-tuple of the form (realname, email_address) and returns the string value suitable for an RFC 2822 From, To or Cc header.
formatdate
Returns a date string as specified by RFC 2822, e.g.:

g

getaddresses
Return a list of (REALNAME, EMAIL) or ('','') for each fieldvalue.

l

localtime
Return local time as an aware datetime object.

m

make_msgid
Returns a string suitable for RFC 2822 compliant Message-ID, e.g:
mktime_tz
Turn a 10-tuple as returned by parsedate_tz() into a POSIX timestamp.

p

parseaddr
Parse addr into its constituent realname and email address parts.
parsedate
Convert a time string to a time tuple.
parsedate_to_datetime
The inverse of format_datetime().
parsedate_tz
Convert a date string to a time tuple.

q

quote
Prepare string to be used in a quoted string.

u

unquote
Remove quotes from a string.