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

Method write

src/pptx/opc/serialized.py:71–79  ·  view source on GitHub ↗

Write a physical package (.pptx file) to `pkg_file`. The serialized package contains `pkg_rels` and `parts`, a content-types stream based on the content type of each part, and a .rels file for each part that has relationships.

(
        cls, pkg_file: str | IO[bytes], pkg_rels: _Relationships, parts: Sequence[Part]
    )

Source from the content-addressed store, hash-verified

69
70 @classmethod
71 def write(
72 cls, pkg_file: str | IO[bytes], pkg_rels: _Relationships, parts: Sequence[Part]
73 ) -> None:
74 """Write a physical package (.pptx file) to `pkg_file`.
75
76 The serialized package contains `pkg_rels` and `parts`, a content-types stream based on
77 the content type of each part, and a .rels file for each part that has relationships.
78 """
79 cls(pkg_file, pkg_rels, parts)._write()
80
81 def _write(self) -> None:
82 """Write physical package (.pptx file)."""

Callers 15

_write_cat_columnMethod · 0.45
_write_seriesMethod · 0.45
_populate_worksheetMethod · 0.45
_populate_worksheetMethod · 0.45
_write_partsMethod · 0.45
_write_pkg_relsMethod · 0.45
saveMethod · 0.45
write_cat_fixtureMethod · 0.45
write_sers_fixtureMethod · 0.45
populate_fixtureMethod · 0.45

Calls 1

_writeMethod · 0.80

Tested by 6

write_cat_fixtureMethod · 0.36
write_sers_fixtureMethod · 0.36
populate_fixtureMethod · 0.36
populate_fixtureMethod · 0.36
it_can_write_a_blobMethod · 0.36