Configuration¶
- class servicex.configuration.Configuration(*, api_endpoints: List[Endpoint], default_endpoint: str | None = None, cache_path: str | None = None, shortened_downloaded_filename: bool | None = False)[source]¶
Bases:
BaseModel
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.
self is explicitly positional-only to allow self as a field name.
- field cache_path: str | None = None¶
- field default_endpoint: str | None = None (alias 'default-endpoint')¶
- validator expand_cache_path » all fields[source]¶
Expand the cache path to a full path, and create it if it doesn’t exist. Expand ${USER} to be the user name on the system. Works for windows, too. :param v: :return:
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod read(config_path: str | None = None)[source]¶
Read configuration from .servicex or servicex.yaml file. :param config_path: If provided, use this as the path to the .servicex file.
Otherwise, search, starting from the current working directory and look in enclosing directories
- Returns:
Populated configuration object
- field shortened_downloaded_filename: bool | None = False¶
Endpoint¶
- class servicex.configuration.Endpoint(*, endpoint: str, name: str, token: str | None = '')[source]¶
Bases:
BaseModel
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.
self is explicitly positional-only to allow self as a field name.
- field endpoint: str [Required]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- field name: str [Required]¶
- field token: str | None = ''¶