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

Method main_document_part

src/docx/opc/package.py:100–107  ·  view source on GitHub ↗

Return a reference to the main document part for this package. Examples include a document part for a WordprocessingML package, a presentation part for a PresentationML package, or a workbook part for a SpreadsheetML package.

(self)

Source from the content-addressed store, hash-verified

98
99 @property
100 def main_document_part(self):
101 """Return a reference to the main document part for this package.
102
103 Examples include a document part for a WordprocessingML package, a presentation
104 part for a PresentationML package, or a workbook part for a SpreadsheetML
105 package.
106 """
107 return self.part_related_by(RT.OFFICE_DOCUMENT)
108
109 def next_partname(self, template: str) -> PackURI:
110 """Return a |PackURI| instance representing partname matching `template`.

Callers

nothing calls this directly

Calls 1

part_related_byMethod · 0.95

Tested by

no test coverage detected