email.headerregistry.HeaderRegistry.__getitem__()

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

email.headerregistry.MIMEVersionHeader.version

version The version number as a string, with any whitespace and/or comments removed.

email.headerregistry.MIMEVersionHeader.minor

minor The minor 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

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.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.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.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.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

class email.headerregistry.Group(display_name=None, addresses=None) The class used to represent an address group. The general form of an address group is: display_name: [address-list]; As a convenience for processing lists of addresses that consist of a mixture of groups and single addresses, a Group may also be used to represent single addresses that are not part of a group by setting display_name to None and providing a list of the single address as addresses. display_name The display_