MCPcopy Index your code
hub / github.com/python-openxml/python-docx / default

Method default

src/docx/opc/parts/coreprops.py:26–35  ·  view source on GitHub ↗

Return a new |CorePropertiesPart| object initialized with default values for its base properties.

(cls, package: OpcPackage)

Source from the content-addressed store, hash-verified

24
25 @classmethod
26 def default(cls, package: OpcPackage):
27 """Return a new |CorePropertiesPart| object initialized with default values for
28 its base properties."""
29 core_properties_part = cls._new(package)
30 core_properties = core_properties_part.core_properties
31 core_properties.title = "Word Document"
32 core_properties.last_modified_by = "python-docx"
33 core_properties.revision = 1
34 core_properties.modified = dt.datetime.now(dt.timezone.utc)
35 return core_properties_part
36
37 @property
38 def core_properties(self):

Callers 1

_core_properties_partMethod · 0.45

Calls 1

_newMethod · 0.80

Tested by

no test coverage detected