cdsapi icon indicating copy to clipboard operation
cdsapi copied to clipboard

support remote fsspec download target

Open samdoolin opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe.

I would like to stream to cloud storage without a local temporary file.

Describe the solution you'd like

Option 1

download target to accept a file-like object

with fsspec.open("s3://my-bucket/ecmwf/data.nc", "wb") as f:
    client.retrieve(dataset, request, target=f) 

Option 2

download target to accept an fsspec URI

client.retrieve(dataset, request, target="s3://my-bucket/ecmwf/data.nc") 

Describe alternatives you've considered

No response

Additional context

related forum post from 2023: https://forum.ecmwf.int/t/download-cds-data-directly-to-aws-s3-cloud-file-using-fsspec-on-python/980

Organisation

No response

samdoolin avatar Oct 15 '25 12:10 samdoolin