Datasets:
ArXiv:
License:
import zarr | |
import argparse | |
if __name__=='__main__': | |
import zarr | |
from pprint import pprint | |
import argparse | |
def arg_parser(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-d", "--database", help="QDGset zipped zarr data path", type=str) | |
return parser.parse_args() | |
parser = arg_parser() | |
path = parser.database | |
store = zarr.ZipStore(path, mode='r') | |
root = zarr.group(store=store) | |
with open("dataset_zarr_tree_display.txt", "w") as output_file: | |
pprint(root.attrs["schema"], stream=output_file) | |
output_file.write("########################\n########################\n") | |
output_file.write(str(root.tree())) | |
print("tree written") | |
store.close() | |