[issue34393] json.dumps - allow compression
liad
report at bugs.python.org
Mon Aug 13 08:24:08 EDT 2018
liad <liad at mailinator.com> added the comment:
The gzip module may work for saving file localy but for example:
This upload json to Google Storage:
import datalab.storage as storage
storage.Bucket('mybucket').item(path).write_to(json.dumps(response), 'application/json')
Your won't work here unless I save the file locally and only then upload it... It's a bit of a problem when your files are 100 GBs+
I still think the json.dump() should support compression
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34393>
_______________________________________
More information about the Python-bugs-list
mailing list