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

Allow fsspec URLs in open_(mf)dataset #4823

Merged
merged 24 commits into from
Feb 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc formatting
  • Loading branch information
Martin Durant committed Jan 27, 2021
commit 05f8e0815cf8cc3d671d719d1a46702bde286813
11 changes: 7 additions & 4 deletions doc/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,10 @@ key ``storage_options``, part of ``backend_kwargs``.

ds_gcs = xr.open_dataset(
"gcs://<bucket-name>/path.zarr",
backend_kwargs={"storage_options": {"project": '<project-name>', "token": None}},
engine="zarr"
backend_kwargs={
"storage_options": {"project": "<project-name>", "token": None}
},
engine="zarr",
)


Expand All @@ -915,8 +917,9 @@ instance and pass this, as follows:
.. code:: python

import gcsfs
fs = gcsfs.GCSFileSystem(project='<project-name>', token=None)
gcsmap = gcsfs.mapping.GCSMap('<bucket-name>', gcs=fs, check=True, create=False)

fs = gcsfs.GCSFileSystem(project="<project-name>", token=None)
gcsmap = gcsfs.mapping.GCSMap("<bucket-name>", gcs=fs, check=True, create=False)
# write to the bucket
ds.to_zarr(store=gcsmap)
# read it back
Expand Down