solvebio-python icon indicating copy to clipboard operation
solvebio-python copied to clipboard

Ability to save a dataset template as a local file for future use

Open davecap opened this issue 8 years ago • 1 comments

It would be nice to be able to save a template to a local JSON file for future use.

davecap avatar May 09 '17 22:05 davecap

To save locally:

dataset_template = dataset.template()
with open('template.json', 'w') as fp:
    json.dump(dataset_template, fp)

To save on SolveBio in the same folder:

import json
Object.get_or_create_by_full_path(dataset.full_path + '.template.json', object_type='file', contents=json.dumps(dataset.template()))

jsh2134 avatar Apr 24 '20 21:04 jsh2134