Skip to content

Commit

Permalink
token anon for s3 examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamman committed Dec 18, 2024
1 parent 9243fc7 commit 5056f14
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docs/user-guide/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ to Zarr's top level API will result in the store being created automatically.
zarr.open_group("data/foo/bar", mode="w")
# implicitly create a read-only FsspecStore
zarr.open_group("s3://noaa-nwm-retro-v2-zarr-pds", mode="r")
zarr.open_group(
"s3://noaa-nwm-retro-v2-zarr-pds",
mode="r",
storage_options={"anon": True}
)
# implicitly creates a MemoryStore
data = {}
Expand Down Expand Up @@ -68,11 +72,16 @@ The :class:`zarr.storage.FsspecStore` stores the contents of a Zarr hierarchy in
logical layout as the ``LocalStore``, except the store is assumed to be on a remote storage system
such as cloud object storage (e.g. AWS S3, Google Cloud Storage, Azure Blob Store). The
:class:`zarr.storage.FsspecStore` is backed by `Fsspec_` and can support any Fsspec backend
that implements the `AbstractFileSystem` API,
that implements the `AbstractFileSystem` API. ``storage_options`` can be used to configure
the Fsspec backend.

.. ipython:: python
store = zarr.storage.FsspecStore.from_url("s3://noaa-nwm-retro-v2-zarr-pds", read_only=True)
store = zarr.storage.FsspecStore.from_url(
"s3://noaa-nwm-retro-v2-zarr-pds",
read_only=True,
storage_options={"anon": True}
)
zarr.open_group(store=store, mode='r')
Memory Store
Expand Down

0 comments on commit 5056f14

Please sign in to comment.