email.headerregistry.MIMEVersionHeader.minor

minor The minor version number as an integer

email.headerregistry.MIMEVersionHeader.major

major The major version number as an integer

email.headerregistry.MIMEVersionHeader

class email.headerregistry.MIMEVersionHeader There is really only one valid value for the MIME-Version header, and that is 1.0. For future proofing, this header class supports other valid version numbers. If a version number has a valid value per RFC 2045, then the header object will have non-None values for the following attributes: version The version number as a string, with any whitespace and/or comments removed. major The major version number as an integer minor The minor

email.headerregistry.HeaderRegistry.__getitem__()

__getitem__(name) Construct and return a class to handle creating a name header.

email.headerregistry.HeaderRegistry.__call__()

__call__(name, value) Retrieves the specialized header associated with name from the registry (using default_class if name does not appear in the registry) and composes it with base_class to produce a class, calls the constructed class’s constructor, passing it the same argument list, and finally returns the class instance created thereby.

email.headerregistry.HeaderRegistry.map_to_type()

map_to_type(self, name, cls) name is the name of the header to be mapped. It will be converted to lower case in the registry. cls is the specialized class to be used, along with base_class, to create the class used to instantiate headers that match name.

email.headerregistry.HeaderRegistry

class email.headerregistry.HeaderRegistry(base_class=BaseHeader, default_class=UnstructuredHeader, use_default_map=True) This is the factory used by EmailPolicy by default. HeaderRegistry builds the class used to create a header instance dynamically, using base_class and a specialized class retrieved from a registry that it holds. When a given header name does not appear in the registry, the class specified by default_class is used as the specialized class. When use_default_map is True (the

email.headerregistry.Group.__str__()

__str__() The str value of a Group is formatted according to RFC 5322, but with no Content Transfer Encoding of any non-ASCII characters. If display_name is none and there is a single Address in the addresses list, the str value will be the same as the str of that single Address.

email.headerregistry.Group.display_name

display_name The display_name of the group. If it is None and there is exactly one Address in addresses, then the Group represents a single address that is not in a group.

email.headerregistry.Group.addresses

addresses A possibly empty tuple of Address objects representing the addresses in the group.