MCPcopy
hub / github.com/pimutils/vdirsyncer / get_multi

Method get_multi

vdirsyncer/storage/base.py:136–149  ·  view source on GitHub ↗

Fetch multiple items. Duplicate hrefs must be ignored. Functionally similar to :py:meth:`get`, but might bring performance benefits on some storages when used cleverly. :param hrefs: list of hrefs to fetch :raises: :exc:`vdirsyncer.exceptions.PreconditionFailed` if

(self, hrefs)

Source from the content-addressed store, hash-verified

134 raise NotImplementedError()
135
136 def get_multi(self, hrefs):
137 '''Fetch multiple items. Duplicate hrefs must be ignored.
138
139 Functionally similar to :py:meth:`get`, but might bring performance
140 benefits on some storages when used cleverly.
141
142 :param hrefs: list of hrefs to fetch
143 :raises: :exc:`vdirsyncer.exceptions.PreconditionFailed` if one of the
144 items couldn't be found.
145 :returns: iterable of (href, item, etag)
146 '''
147 for href in uniq(hrefs):
148 item, etag = self.get(href)
149 yield href, item, etag
150
151 def has(self, href):
152 '''Check if an item exists by its href.

Calls 2

getMethod · 0.95
uniqFunction · 0.85