pycsamt.api.cli.options#

pycsamt.api.cli.options#

Reusable Click option decorators shared across all pyCSAMT commands.

Importing a decorator and stacking it onto a Click command automatically wires up the matching argument name — no need to repeat option strings in every command.

Usage#

import click
from pycsamt.api.cli.options import verbose_option, output_dir_option

@click.command()
@verbose_option
@output_dir_option
def my_command(verbose, output_dir):
    ...

Functions

common_options(f)

Attach verbose, no-color, format, and output-dir to a command.

pycsamt.api.cli.options.common_options(f)[source]#

Attach verbose, no-color, format, and output-dir to a command.

pycsamt.api.cli.options.format_option(f)#

Add the text, JSON, or CSV output-format option to a Click command.

Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.fresh_option(f)#
Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.n_jobs_option(f)#

Add the positive --jobs parallel-worker option to a Click command.

Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.no_cache_option(f)#

Add the --no-cache processing option to a Click command.

Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.no_color_option(f)#

Add the --no-color terminal-output option to a Click command.

Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.output_dir_option(f)#

Add the writable --output-dir path option to a Click command.

Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.overwrite_option(f)#

Add the --overwrite confirmation-bypass option to a Click command.

Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.survey_option(f)#
Parameters:

f (FC)

Return type:

FC

pycsamt.api.cli.options.verbose_option(f)#

Add the repeatable --verbose logging option to a Click command.

Parameters:

f (FC)

Return type:

FC