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

Method new

src/pptx/parts/embeddedpackage.py:51–61  ·  view source on GitHub ↗

Return new |EmbeddedPackagePart| subclass object. The returned part object contains `blob` and is added to `package`.

(cls, blob: bytes, package: Package)

Source from the content-addressed store, hash-verified

49
50 @classmethod
51 def new(cls, blob: bytes, package: Package):
52 """Return new |EmbeddedPackagePart| subclass object.
53
54 The returned part object contains `blob` and is added to `package`.
55 """
56 return cls(
57 package.next_partname(cls.partname_template),
58 cls.content_type,
59 package,
60 blob,
61 )
62
63
64class EmbeddedDocxPart(EmbeddedPackagePart):

Callers 1

factoryMethod · 0.45

Calls 1

next_partnameMethod · 0.80

Tested by

no test coverage detected