queenbee.config package¶
Submodules¶
Module contents¶
- class queenbee.config.Config(*, type: ConstrainedStrValue = 'Config', annotations: Dict[str, Any] = None, auth: List[Union[JWTAuth, HeaderAuth]] = [], repositories: List[RepositoryReference] = [])[source]¶
Bases:
BaseModel
- class Config[source]¶
Bases:
object
- json_encoders = {<class 'pydantic.types.SecretStr'>: <function Config.Config.<lambda>>}¶
- add_auth(auth: Union[JWTAuth, HeaderAuth])[source]¶
add an authentication method for a specific repository domain
- Parameters:
auth (Union[JWTAuth, HeaderAuth]) – An authentication config object
- add_repository(repo: RepositoryReference, force: bool = False)[source]¶
add a repository reference to the config
- Parameters:
repo (RepositoryReference) – a repository source url and its given name in the config
force (bool, optional) – overwrite existing repository reference with the same name if it exsits. Defaults to False.
- Raises:
ValueError – error thrown if the repository reference already exists and is not to be overwritten
- auth: List[Union[JWTAuth, HeaderAuth]]¶
- get_auth_header(repository_url: str) Dict[str, str] [source]¶
Get auth headers for the given repository url
- Parameters:
repository_url (str) – The url to a repository
- Returns:
an authorization header string (eg: “Bearer some-jwt-token”)
- Return type:
str
- get_repository(name: str) RepositoryReference [source]¶
get a repository reference by name for the config
- Returns:
a repository reference
- Return type:
- remove_repository(name: str)[source]¶
remove a repository reference from the config
- Parameters:
name (str) – the name of the repository to remove
- repositories: List[RepositoryReference]¶
- type: ConstrainedStrValue¶