I have a top directory ds237 which has multiple sub-directories under it as below:
ds237
ds237/ ├── dataset_description.json ├── derivatives ├── sub-0
You can use subprocess calling 'zip' and passing the paths as arguments