Add apply function to pastastore
dbrakenhoff opened this issue · comments
Davíd Brakenhoff commented
Add method to apply custom functions to entries in libraries:
func = lambda ml: ml.get_contribution("well")
pstore.apply("models", func)
should be simple code:
def apply(self, libname, func, names=None, progressbar=True):
names = self.conn._parse_names(names, libname)
result = []
for n in (tqdm(names) if progressbar else names):
result.append(func(self.conn._get_item(libname, n)))
return result
Davíd Brakenhoff commented
Closed by #100