yera.cli.commands.put

Credential write and subtree replacement operations.

Symbols

def cred — Set a single credential leaf.
def creds — Replace all credential leaves beneath a namespace.

cred

cred(
    key: str,
    value: str | None = None,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Set a single credential leaf.

Parameters

key
type: str

Exact dotted leaf key.

value
type: str | None = None

Credential value. Omit for interactive prompt or stdin.

Raises

CredentialKeyError

If the key conflicts with existing credentials or the supplied value is empty.

creds

creds(
    path: str,
    json_str: str | None = None,
    from_file: Annotated[str | None, Parameter(name='--from-file')] = None,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Replace all credential leaves beneath a namespace.

Parameters

path
type: str

Dotted namespace to replace.

json_str
type: str | None = None

Inline JSON object to store.

from_file
type: Annotated[str | None, Parameter(name='--from-file')] = None

JSON file path, or - for standard input.

Raises

CredentialKeyError

If input is empty or conflicts with stored leaves.