🔌 Application Programming Interface#

galactic.apps.cli.framework.core module.

author_option#

A click option for decorating commands, adding them an author

description_option#

A click option for decorating commands, adding them a description

project_option#

A click option for decorating commands, adding them a project name

folder_option#

A click option for decorating commands, adding them a folder option

generate(templates, path, data, aliases)#

Generate the files.

Parameters:
  • templates (Path) – Template files

  • data (dict[str, Any] | None) – Dictionary of values

  • path (Path) – Where to generate the plugin

  • aliases (dict[str, list[str]] | None) – A dictionary of path aliases

Return type:

None

author_ensure(authors)#

Ensure authors is correct.

Parameters:

authors (list[Author]) – A list of authors

Returns:

A non empty list of authors

Return type:

list[Author]

author_post(authors)#

Post-process the authors.

Parameters:

authors (list[Author]) – The list of authors

Return type:

None

class Author(name, email)#

Bases: object

Package author.

classmethod from_string(value)#

Compute an author from a string.

Parameters:

value (str) – A string representation of an author

Raises:
  • ValueError – If the value is empty

  • click.BadParameter – If the value does not match the author regular expression

Return type:

Author

get_config_path(filename='config.yaml')#

Get the config path.

Returns:

The config path.

Return type:

Path

galactic.apps.cli.framework.meta.create module.

meta#

An extensible click group for adding commands to the framework