CPL_CLI

cpl_cli.cli

class cpl_cli.cli.CLI(config: cpl.configuration.configuration_abc.ConfigurationABC, services: cpl.dependency_injection.service_provider_abc.ServiceProviderABC)

Bases: cpl.application.application_abc.ApplicationABC

configure()

Prepare the application :return:

main()

Entry point of the CPL CLI :return:

cpl_cli.cli_settings

class cpl_cli.cli_settings.CLISettings

Bases: cpl.configuration.configuration_model_abc.ConfigurationModelABC

from_dict(settings: dict)

Converts attributes to dict :param settings: :return:

property pip_path

cpl_cli.cli_settings_name_enum

class cpl_cli.cli_settings_name_enum.CLISettingsNameEnum(value)

Bases: enum.Enum

An enumeration.

pip_path = 'PipPath'

cpl_cli.command_abc

class cpl_cli.command_abc.CommandABC

Bases: abc.ABC

abstract property help_message
abstract run(args: list)

cpl_cli.command_handler_service

class cpl_cli.command_handler_service.CommandHandler(config: cpl.configuration.configuration_abc.ConfigurationABC, services: cpl.dependency_injection.service_provider_abc.ServiceProviderABC)

Bases: abc.ABC

add_command(cmd: cpl_cli.command_model.CommandModel)
property commands
handle(cmd: str, args: list)

Handles incoming commands and args :param cmd: :param args: :return:

remove_command(cmd: cpl_cli.command_model.CommandModel)

cpl_cli.command_model

class cpl_cli.command_model.CommandModel(name: str, aliases: list, command: collections.abc.Callable[cpl_cli.command_abc.CommandABC], is_workspace_needed: bool, is_project_needed: bool, change_cwd: bool)

Bases: object

property aliases
property change_cwd
property command
property is_project_needed
property is_workspace_needed
property name

cpl_cli.error

class cpl_cli.error.Error

Bases: object

static error(message: str)
static warn(message: str)

cpl_cli.main

cpl_cli.main.main()

cpl_cli.startup

class cpl_cli.startup.Startup(config: cpl.configuration.configuration_abc.ConfigurationABC, services: cpl.dependency_injection.service_collection_abc.ServiceCollectionABC)

Bases: cpl.application.startup_abc.StartupABC

configure_configuration()cpl.configuration.configuration_abc.ConfigurationABC

Creates configuration of application :return: configuration

configure_services()cpl.dependency_injection.service_provider_abc.ServiceProviderABC

Creates service provider :return: service provider

Module contents

sh_cpl-cli sh-edraft Common Python library CLI

sh-edraft Common Python library Command Line Interface

copyright
  1. 2020 - 2021 sh-edraft.de

license

MIT, see LICENSE for more details.

class cpl_cli.VersionInfo(major, minor, micro)

Bases: tuple

major

Alias for field number 0

micro

Alias for field number 2

minor

Alias for field number 1