rushter <m...@rushter.com> added the comment:
You can use the gzip module. with gzip.GzipFile('products.json', 'w') as outfile: outfile.write(json.dumps(data, outfile, sort_keys=True)) ---------- nosy: +rushter _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34393> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com