Marks an s3:// URL for the zarrs Rust backend. All I/O is delegated to
object_store, so this class requires the s3 compiled feature
(r-universe tier).
Details
S3Store is a dispatch marker, not a full store: it carries a URL and
implements no key-level I/O of its own. Reads go through
zarrs_open_array_metadata() and zarrs_get_subset(), which take the
s3:// URL directly. Calling get_item(), contains_item() or
listdir() on this object raises an error pointing at those functions and
at HttpStore.
The S3 client is configured with environment variables, read by
object_store when the store is first opened. These mirror the
storage_options that fsspec and xarray users pass in Python:
AWS_ENDPOINTAlternate endpoint, e.g. MinIO, Ceph, or an Open Storage Network pod. Equivalent to fsspec
client_kwargs = list(endpoint_url = ...).AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKENCredentials. When none are set, requests are unsigned, so public buckets work with no configuration (fsspec
anon = TRUE).AWS_REGIONRegion. Often unnecessary for non-AWS endpoints.
AWS_ALLOW_HTTPSet to
"true"to permit plain-HTTP endpoints.AWS_VIRTUAL_HOSTED_STYLE_REQUESTSet to
"false"for path-style addressing.AWS_SKIP_SIGNATUREForce anonymous (
"true") or signed ("false") requests regardless of the credentials present.
Store handles are cached by URL on the Rust side, so changing any of these
variables has no effect on an already-open store until you call
zarrs_close_store().
Writes to S3 are not supported.
See also
HttpStore for reading an S3-compatible endpoint over plain
HTTPS, which works on both distribution tiers.
vignette("remote-stores") for worked examples.
Other Store classes:
DirectoryStore,
GcsStore,
HttpStore,
MemoryStore,
Store
Super class
pizzarr::Store -> S3Store
Methods
Method print()
Print a human-readable summary of the store.
Examples
if (FALSE) { # \dontrun{
# Public bucket on an Open Storage Network pod (USGS gridMET).
Sys.setenv(AWS_ENDPOINT = "https://usgs.osn.mghpcc.org")
url <- "s3://mdmf/gdp/gridMET.zarr"
zarrs_open_array_metadata(url, "lat")
zarrs_get_subset(url, "lat", list(c(0L, 5L)), NULL)
zarrs_close_store(url)
} # }
