Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions changes/3212.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Add a description on how to create a RemoteStore of a specific filesystem to the `Remote Store` section in `docs\user-guide\storage.rst`.
- State in the docstring of `FsspecStore.from_url` that the filesystem type is inferred from the URL scheme.

It should help a user handling the case when the type of FsspecStore doesn't match the URL scheme.
10 changes: 10 additions & 0 deletions docs/user-guide/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ API. ``storage_options`` can be used to configure the fsspec backend.:
>>> zarr.open_group(store=store, mode='r')
<Group <FsspecStore(S3FileSystem, noaa-nwm-retro-v2-zarr-pds)>>

The type of filesystem (e.g. S3, https, etc..) is inferred from the scheme of the url (e.g. s3 for "**s3**://noaa-nwm-retro-v2-zarr-pds").
In case a specific filesystem is needed, one can explicitly create it. For example to create a S3 filesystem:

>>> import fsspec
>>> fs = fsspec.filesystem(
... 's3', anon=True, asynchronous=True,
... client_kwargs={'endpoint_url': "https://noaa-nwm-retro-v2-zarr-pds.s3.amazonaws.com"}
... )
>>> store = zarr.storage.FsspecStore(fs)

Memory Store
~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion src/zarr/storage/_fsspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def from_url(
allowed_exceptions: tuple[type[Exception], ...] = ALLOWED_EXCEPTIONS,
) -> FsspecStore:
"""
Create a FsspecStore from a URL.
Create a FsspecStore from a URL. The type of store is determined from the URL scheme.

Parameters
----------
Expand Down