Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have ZarrToZarr write to json in the function? #441

Open
raybellwaves opened this issue Mar 21, 2024 · 1 comment
Open

Have ZarrToZarr write to json in the function? #441

raybellwaves opened this issue Mar 21, 2024 · 1 comment

Comments

@raybellwaves
Copy link
Contributor

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

@martindurant
Copy link
Member

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) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants