Paper Office
paper-docxAPI referencepackage

ImageParts

paper-docx 0.2.0 API reference

Collection of ImagePart objects corresponding to images in the package.

ImageParts()

Functions

__contains__

func__contains__(item: object)
paramitemobject

__iter__

func__iter__()

__len__

func__len__()

append

funcappend(item: ImagePart)
paramitemImagePart

get_or_add_image_part

funcget_or_add_image_part(image_descriptor: str | IO[bytes]) -> ImagePart

Return ImagePart object containing image identified by image_descriptor.

The image-part is newly created if a matching one is not present in the collection.

paramimage_descriptorstr | IO[bytes]

Returns

docx.parts.image.ImagePart

On this page