I am writing a Contentsmanager
for a Jupyter project, where we will be storing data in a SwiftStore.
I'm mostly getting there, and can upload data to the store:
# horribly paraphrased
def write(self, path, content):
_opts = {'object_uu_threads' : 20}
with SwiftService( options = _opts ) as swift, OutputManager() as out_manager:
output = io.StringIO(content)
response = swift.upload(self.container, [output])
(you will notice the contents are in a variable)
What I need to do is go the other way: download into a variable
I suspect it's something to do with the options passed into the download function.... perhaps the out_file
parameter.... but
- Is that actually what that parameter is for, and
- How to I (pythonically) set that up to be a variable in my code?