sortinghat.cli package

Subpackages

Submodules

sortinghat.cli.sortinghat module

sortinghat.cli.utils module

sortinghat.cli.utils.connect(client)[source]

Context for commands to handle connections.

Creates a context that will initialize and dispose a client connection. Client errors will be handled and raised as ClickException instances.

Parameters

client – an initialized client

sortinghat.cli.utils.display(template, nl=True, **kwargs)[source]

Render and display a template.

Giving the name of a template with the parameter template, this function will locate and render it using the arguments passed as keywords.

Parameters
  • template – name of the template

  • nl – if set to True, it renders a newline afterwards

  • kwargs – list of attributes required to render the template

sortinghat.cli.utils.sh_client(func)[source]

Decorator to initialize a SortingHat client.

This decorator initializes a client that will be available in the context object.

sortinghat.cli.utils.sh_client_cmd_options(func)[source]

Decorator to add options to a command to initialize a client.

Module contents