Skip to content

Secret

zenml.cli.secret

validate_kv_pairs(key, value)

Check that the key and value are valid

Parameters:

Name Type Description Default
key Optional[str]

key of the secret

required
value Optional[str]

value of the secret

required
Source code in zenml/cli/secret.py
def validate_kv_pairs(key: Optional[str], value: Optional[str]) -> bool:
    """Check that the key and value are valid

    Args:
        key: key of the secret
        value: value of the secret
    """
    return bool((not key or value) and (not value or key))