Skip to content

Commit

Permalink
Merge pull request #120 from damirkrstanovic/develop
Browse files Browse the repository at this point in the history
Clarified bulk exports documentation
  • Loading branch information
QuicksilverMachine committed Aug 21, 2019
2 parents f67fb77 + 94b5cda commit 1048389
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1578,27 +1578,23 @@ data for each job, for example:
volume = api.volumes.get('user/volume')
# Submit export jobs
exports = [
{
'file': 'example_file.txt',
'volume': volume,
'location': '/data/example_file.txt',
'properties': {
'some_property': 'value'
}
'overwrite': True
},
{
'file': 'example_file_2.txt',
'volume': volume,
'location': '/data/example_file_2.txt',
'properties': {
'some_property_2': 'value_2'
},
'overwrite': False
},
]
# Find some files to export
files_to_export = list(api.files.query(project='user/my-project').all())
# Create exports list
# We will be exporting all the files in a project (root folder only) to
# the volume, with a location same as the name of the file
exports = []
for file in files_to_export:
export = {
'file':file,
'volume': volume,
'location':file.name
}
exports.append(export)
response = api.exports.bulk_submit(exports=exports, copy_only=False)
Expand Down

0 comments on commit 1048389

Please sign in to comment.