<div dir="ltr">Hi Brian,<div><br></div><div>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.</div><div><br></div><div><font face="monospace, monospace"> from six import BytesIO</font></div><div><font face="monospace, monospace"> myData = b'foo'</font></div><div><font face="monospace, monospace"> stream = BytesIO(myData)</font></div><div><font face="monospace, monospace"><br></font></div><div><br></div><div>[1] <a href="https://github.com/girder/girder/blob/master/clients/python/girder_client/__init__.py#L757">https://github.com/girder/girder/blob/master/clients/python/girder_client/__init__.py#L757</a></div><div><br></div><div>Hope this helps,</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Zach Mullen<br>Kitware, Inc.<br>919-869-8858</div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Dec 19, 2016 at 5:11 PM, Brian E Chapman <span dir="ltr"><<a href="mailto:Brian.Chapman@utah.edu" target="_blank">Brian.Chapman@utah.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Everyone,<br>
<br>
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.<br>
<br>
Thanks,<br>
<br>
Brian<br>
<br>
______________________________<wbr>_________________<br>
Girder-users mailing list<br>
<a href="mailto:Girder-users@public.kitware.com">Girder-users@public.kitware.<wbr>com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/girder-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/girder-users</a><br>
</blockquote></div><br></div>