ursa.store.config¶
Pydantic config models for the Ursa object-store layer.
A YAML config maps named roles (default, raw, catalog,
polaris_cache, …) to backend configs. M1 ships R2 + Local; S3 / GCS
land as additive discriminator values once they have a real backend
implementation.
Credentials never appear in YAML. The r2 backend resolves credentials
at construction time via constellation_utils.secrets.r2_*(). The YAML
selects which of those four accessors to call via the creds field;
the bucket name rides along on the resolved R2Secrets object so the
config never names buckets either — the cred selector IS the bucket
selector.
Module Contents¶
Classes¶
Cloudflare R2 backend, S3-protocol via obstore. |
|
Local filesystem backend backed by |
|
Top-level config. |
Data¶
API¶
- ursa.store.config.__all__¶
[‘R2StoreConfig’, ‘LocalStoreConfig’, ‘ObjectStoreConfig’, ‘UrsaConfig’, ‘R2Creds’]
- ursa.store.config.R2Creds¶
None
- class ursa.store.config._Base(/, **data: typing.Any)[source]¶
Bases:
pydantic.BaseModel- model_config¶
‘ConfigDict(…)’
- class ursa.store.config.R2StoreConfig(/, **data: typing.Any)[source]¶
Bases:
ursa.store.config._BaseCloudflare R2 backend, S3-protocol via obstore.
credsselects the constellation-utils accessor (and therefore the bucket —*_rwaccessors return RW credentials,*_roreturn RO). The bucket name comes from the resolved credential object; we never repeat it in YAML.Mapping (see
docs/source/architecture.md):assets_rw->constellation-assets[-test]RW (Ursa-managed data)assets_ro->constellation-assets[-test]RO (downstream readers)raw_rw->constellation-data[-test]RW (data-engine uploader)raw_ro->constellation-data[-test]RO (Ursa reading raw)
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- backend: Literal[r2]¶
None
- creds: ursa.store.config.R2Creds¶
None
- prefix: str = <Multiline-String>¶
- class ursa.store.config.LocalStoreConfig(/, **data: typing.Any)[source]¶
Bases:
ursa.store.config._BaseLocal filesystem backend backed by
obstore.store.LocalStore.rootis combined withprefixand resolved on construction; theLocalStorethen confines all keys under that directory.Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- backend: Literal[local]¶
None
- root: pathlib.Path¶
None
- prefix: str = <Multiline-String>¶
- ursa.store.config.ObjectStoreConfig¶
None
- class ursa.store.config.UrsaConfig(/, **data: typing.Any)[source]¶
Bases:
ursa.store.config._BaseTop-level config.
storesmaps role names to backend configs.get_store(role)defaultsroleto"default"; configs that omit adefaultentry must passrole=explicitly toget_store().Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- stores: dict[str, ursa.store.config.ObjectStoreConfig]¶
None