Skip to content

spark_on_k8s.cli

Implementation reference. These symbols describe how the project works; their presence here does not make them supported application imports. Use the documented entry points and support policy.

API_EXTRA_MESSAGE = "The API requires the 'api' extra: pip install 'spark-on-k8s[api]'" module-attribute

cli()

Submit, watch and manage Spark applications on Kubernetes without an operator.

Source code in spark_on_k8s/cli/__init__.py
26
27
28
29
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
@click.version_option(package_name="spark-on-k8s")
def cli():
    """Submit, watch and manage Spark applications on Kubernetes without an operator."""

main()

Source code in spark_on_k8s/cli/__init__.py
50
51
52
53
54
55
56
57
58
59
def main():
    try:
        commands = _commands()
    except ConfigurationError as error:
        # A malformed variable would otherwise end every command, --help included, in a traceback.
        click.echo(f"Error: {error}", err=True)
        raise SystemExit(1) from None
    for command in commands:
        cli.add_command(command)
    cli(max_content_width=120)