MCPcopy Create free account
hub / github.com/scanny/python-pptx / default

Method default

src/pptx/parts/coreprops.py:26–37  ·  view source on GitHub ↗

Return default new |CorePropertiesPart| instance suitable as starting point. This provides a base for adding core-properties to a package that doesn't yet have any.

(cls, package: Package)

Source from the content-addressed store, hash-verified

24
25 @classmethod
26 def default(cls, package: Package):
27 """Return default new |CorePropertiesPart| instance suitable as starting point.
28
29 This provides a base for adding core-properties to a package that doesn't yet
30 have any.
31 """
32 core_props = cls._new(package)
33 core_props.title = "PowerPoint Presentation"
34 core_props.last_modified_by = "python-pptx"
35 core_props.revision = 1
36 core_props.modified = dt.datetime.now(dt.timezone.utc).replace(tzinfo=None)
37 return core_props
38
39 @property
40 def author(self) -> str:

Callers 2

core_propertiesMethod · 0.80

Calls 1

_newMethod · 0.45

Tested by 1