[Girder-users] Uploading in-memory value to Girder
Zach Mullen
zach.mullen at kitware.com
Tue Dec 20 10:43:37 EST 2016
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 <Brian.Chapman at utah.edu>
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: <http://public.kitware.com/pipermail/girder-users/attachments/20161220/d6fd1583/attachment.html>
More information about the Girder-users
mailing list