From Brian.Chapman at utah.edu Mon Dec 19 17:11:16 2016 From: Brian.Chapman at utah.edu (Brian E Chapman) Date: Mon, 19 Dec 2016 22:11:16 +0000 Subject: [Girder-users] Uploading in-memory value to Girder Message-ID: Hi Everyone, A quick question. Within a Python program, is there a way to upload a value to Girder without first writing that value to disk? Looking at the methods for a GirderClient instance it seems like there is only upload support for files. Thanks, Brian From zach.mullen at kitware.com Tue Dec 20 10:43:37 2016 From: zach.mullen at kitware.com (Zach Mullen) Date: Tue, 20 Dec 2016 10:43:37 -0500 Subject: [Girder-users] Uploading in-memory value to Girder In-Reply-To: References: Message-ID: Hi Brian, The GirderClient.uploadFile method[1] can upload from any stream object. If your object is in memory, you can turn it into a stream by wrapping it in a BytesIO object, e.g. from six import BytesIO myData = b'foo' stream = BytesIO(myData) [1] https://github.com/girder/girder/blob/master/clients/python/girder_client/__init__.py#L757 Hope this helps, Zach Mullen Kitware, Inc. 919-869-8858 On Mon, Dec 19, 2016 at 5:11 PM, Brian E Chapman wrote: > Hi Everyone, > > A quick question. Within a Python program, is there a way to upload a > value to Girder without first writing that value to disk? Looking at the > methods for a GirderClient instance it seems like there is only upload > support for files. > > Thanks, > > Brian > > _______________________________________________ > Girder-users mailing list > Girder-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/girder-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: