ursa.store.backends.r2¶
Cloudflare R2 backend, S3-protocol via obstore.
Credentials (and bucket) are pulled from constellation-utils based on
the creds field of R2StoreConfig. The cred-name selector is the
single source of truth for which bucket the store binds to:
assets_rw->secrets.r2_assets_rw()->constellation-assetsRWassets_ro->secrets.r2_assets_ro()->constellation-assetsROraw_rw->secrets.r2_raw_rw()->constellation-dataRWraw_ro->secrets.r2_raw_ro()->constellation-dataRO
The configured prefix is pushed into the obstore handle at
construction so raw_obstore() returns a prefix-correct handle for
Lance/Zarr backends to consume natively.
Module Contents¶
Functions¶
Construct an R2-backed |
Data¶
API¶
- ursa.store.backends.r2._CREDS_MAP: Final[dict[ursa.store.config.R2Creds, collections.abc.Callable[[], constellation_utils.secrets.models.R2Secrets]]]¶
None
- ursa.store.backends.r2.build_r2_store(cfg: ursa.store.config.R2StoreConfig, *, role: str, allow_http: bool = False) ursa.store.base.ObjectStore[source]¶
Construct an R2-backed
ObjectStorefor the given role.R2 requires
virtual_hosted_style_request=False(path-style addressing); region is always"auto"per Cloudflare’s S3 protocol.allow_httpshould only be set toTruein tests against a local HTTP endpoint (e.g. MinIO). Production R2 always uses HTTPS.