cedar.cli.options module

cedar CLI options and defaults

cedar.cli.options.STYLE_DEBUG(*args, **kwds)
cedar.cli.options.STYLE_ERROR(*args, **kwds)
cedar.cli.options.STYLE_INFO(*args, **kwds)
cedar.cli.options.STYLE_WARNING(*args, **kwds)
cedar.cli.options.fetch_config(ctx, fail_if_missing=True)[source]

Fetch config from a click context with error handling

Parameters
  • ctx (click.Context) – Click CLI context

  • fail_if_missing (bool, optional) – Raise an exception if config is missing. Otherwise returns None

Returns

Configuration data

Return type

dict

Raises

click.BadParameter – Raised if configuration isn’t available

cedar.cli.options.fetch_param(ctx, name)[source]

Try to fetch a click.Parameter from a click.Context (or its parents)