INNER CODE UNIT · Python

_get_client

flyteorg/flytekit · flytekit/clis/flyte_cli/main.py:273

def _get_client(host: str, insecure: bool) -> _friendly_client.SynchronousFlyteClient:
    parent_ctx = click.get_current_context(silent=True)
    kwargs = {}
    if parent_ctx.obj["cacert"]:
        kwargs["root_certificates"] = parent_ctx.obj["cacert"]
    cfg = parent_ctx.obj["config"]
    cfg = replace(cfg, endpoint=host, insecure=insecure)

    return _friendly_client.SynchronousFlyteClient(cfg, **kwargs)


_PROJECT_FLAGS = ["-p", "--project"]
_DOMAIN_FLAGS = ["-d", "--domain"]
_NAME_FLAGS = ["-n", "--name"]
_VERSION_FLAGS = ["-v", "--version"]
_HOST_FLAGS = ["-h", "--host"]
_CONFIG_FLAGS = ["-c", "--config"]
_PRINCIPAL_FLAGS = ["-r", "--principal"]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…