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

Method from_stream

src/docx/image/tiff.py:135–140  ·  view source on GitHub ↗

Return a new |_IfdEntries| instance parsed from `stream` starting at `offset`.

(cls, stream, offset)

Source from the content-addressed store, hash-verified

133
134 @classmethod
135 def from_stream(cls, stream, offset):
136 """Return a new |_IfdEntries| instance parsed from `stream` starting at
137 `offset`."""
138 ifd_parser = _IfdParser(stream, offset)
139 entries = {e.tag: e.value for e in ifd_parser.iter_entries()}
140 return cls(entries)
141
142 def get(self, tag_code, default=None):
143 """Return value of IFD entry having tag matching `tag_code`, or `default` if no

Callers

nothing calls this directly

Calls 2

_IfdParserClass · 0.85
iter_entriesMethod · 0.80

Tested by

no test coverage detected