kerchunk
kerchunk copied to clipboard
Have ZarrToZarr write to json in the function?
Currently one can write to json outside of the function
zarrchunks = kerchunk.zarr.ZarrToZarr(uri)
with open(out_json, "wb") as f:
f.write(ujson.dumps(zarrchunks))
Given this is a common operation it could be added to single_zarr
Other scanners allow you to pass the filename/storage_options (for JSON output) in the .translate() methods. The functional form is the same as ScanClass(input_args).translate(output_args) .