paper-docxAPI referenceoxml.xmlchemy
RequiredAttribute
paper-docx 0.2.0 API reference
Defines a required attribute on a custom element class.
A required attribute is assumed to be present for reading, so does not have a
default value; its actual value is always used. If missing on read, an
InvalidXmlError is raised. It also does not remove the attribute if None is
assigned. Assigning None raises TypeError or ValueError, depending on the
simple type of the attribute.
Functions
populate_class_members
funcpopulate_class_members(element_cls: MetaOxmlElement, prop_name: str) -> NoneAdd the appropriate methods to element_cls.
paramelement_clsMetaOxmlElementparamprop_namestrReturns
None