Actions
Support #21940
closedProvide example of using replace_files to pluck files from a large set of collections
Status:
Closed
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Due date:
Story points:
-
Updated by Peter Amstutz 9 months ago
- Status changed from New to Closed
This turned out to not be useful to the support request, but here's the code.
#!/bin/env python3 import arvados api = arvados.api() files = ["e715923f01e46037a8ccae85487f0d79+1243/ERR2122553.g.vcf.gz", "4fce132bc4ae9b4cc844115246a6bd41+175/head.html", "294b75dc55a50fc863148199c3164f75+65/sample-metadata.yml"] rf = {} for f in files: sp = f.split("/", 2) rf["/"+sp[1]] = f print(rf) item = api.collections().create(body={"name": "foo"}, replace_files=rf).execute() print(item)
Actions