We would love for you to contribute to CPL and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:

If you find a bug in the source code, you can help us by [submitting an issue](#submitting-an-issue) to our [Gitea Repository][gitea-repo]. Even better, you can [submit a Pull Request](#submitting-a-pull-request) with a fix.

You can request a new feature by submitting an issue to our [Gitea Repository][gitea-repo]. If you would like to implement a new feature, please consider the size of the change in order to determine the right steps to proceed:

. If you would like to implement a new feature, please consider the size of the change in order to determine the right steps to proceed:

For a Major Feature, first open an issue and outline your proposal so that it can be discussed. This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.

Note: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.

Small Features can be crafted and directly submitted as a [Pull Request](#submit-pr).

Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.

We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we require that you provide a minimal reproduction. Having a minimal reproducible scenario gives us a wealth of important information without going back and forth to you with additional questions.

A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.

We require a minimal reproduction to save maintainers' time and ultimately be able to fix more bugs. Often, developers find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essential bits of code from a larger codebase but we really need to isolate the problem before we can fix it.

We require a minimal reproduction to save maintainers’ time and ultimately be able to fix more bugs. Often, developers find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essential bits of code from a larger codebase but we really need to isolate the problem before we can fix it.

Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you, we are going to close an issue that doesn't have enough info to be reproduced.

Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don’t hear back from you, we are going to close an issue that doesn’t have enough info to be reproduced.

Before you submit your Pull Request (PR) consider the following guidelines:

Search the [repository][gitea-repo] for an open or closed PR that relates to your submission. You don't want to duplicate existing efforts.

 for an open or closed PR that relates to your submission. You don’t want to duplicate existing efforts.

Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design upfront helps to ensure that we're ready to accept your work.

Be sure that an issue describes the problem you’re fixing, or documents the design for the feature you’d like to add. Discussing the design upfront helps to ensure that we’re ready to accept your work.

In your forked repository, make your changes in a new git branch:

Note: the optional commit ```-a``` command line option will automatically "add" and "rm" edited files.

 command line option will automatically “add” and “rm” edited files.

The sh-edraft.de team reserves the right not to accept pull requests from community members who haven't been good citizens of the community. Such behavior includes not following the CPL [coding rules](#coding-rules) and applies within or outside of CPL managed channels.

The sh-edraft.de team reserves the right not to accept pull requests from community members who haven’t been good citizens of the community. Such behavior includes not following the CPL 

Create a fixup commit and push to your repository (this will update your Pull Request):

To ensure consistency throughout the source code, keep these rules in mind as you are working:

All features or bug fixes must be tested by one or more unit-tests.

We follow [PEP 8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/).

By contributing, you agree that your contributions will be licensed under its MIT License.
See [LICENSE](https://git.sh-edraft.de/sh-edraft.de/cpl/src/branch/master/LICENSE)

cpl **add** *&lt;source-project&gt;* *&lt;target-project&gt;* <br>
cpl **a** *&lt;source-project&gt;* *&lt;target-project&gt;* <br>
cpl **A** *&lt;source-project&gt;* *&lt;target-project&gt;*

If you call the command in a CPL workspace, you can use the project names. Otherwise the paths of the projects must be specified.

Copies an python app into an output directory named build/ at the given output path. Must be executed within a CPL workspace or project directory

The command can be used to build a project of type "console" or "library".

The command can be used to build a project of type “console” or “library”.

The build command copies all included source files to the output directory. You can run the source files in the output directory directly.

The command is used to prepare the source files for the publish command or to copy them to an target for execution.

<!-- ## Arguments

| Argument      | Description   | Value type      |
| ------------- |:-------------:|:----------------:|
| ```<project>```     | The name of the project to build. Can be an console or a library. | ```str``` -->

cpl **generate** *&lt;schematic&gt;* *&lt;name&gt;* <br>
cpl **g** *&lt;schematic&gt;* *&lt;name&gt;* <br>
cpl **G** *&lt;schematic&gt;* *&lt;name&gt;*

You can define custom schematics by creating templates in a ```.cpl``` folder.

First element of path will be used as base-path not 'src'. For example: 'cpl g c test/Test' will be created at ```src/test/``` with --base it would be ```test/```

First element of path will be used as base-path not ‘src’. For example: ‘cpl g c test/Test’ will be created at 

cpl **help** *&lt;command&gt;* <br>
cpl **h** *&lt;command&gt;* <br>
cpl **H** *&lt;command&gt;*

cpl **install** *&lt;package&gt;* <br>
cpl **i** *&lt;package&gt;* <br>
cpl **I** *&lt;package&gt;*

Install given package to project via pip.
Without given package it will install the depedencies of the CPL project your in.

Generates a workspace and initial project or add a project to workspace.

cpl **new** *&lt;type&gt;* *&lt;name&gt;*<br>
cpl **n** *&lt;type&gt;* *&lt;name&gt;* <br>
cpl **N** *&lt;type&gt;* *&lt;name&gt;*

You can define custom project types by creating templates in a ```.cpl``` folder.

If the command is running in a CPL workspace, it will add the new project to the workspace.

To create, build, and serve a new, basic CPL project on a development server, go to the parent directory of your new workspace use the following commands:

Most commands, and some options, have aliases. Aliases are shown in the syntax statement for each command.

Options that specify files can be given as absolute paths, or as paths relative to the current working directory, which is generally either the workspace or project root.

The cpl generate command takes as an argument the artifact to be generated.  In addition to any general options, each artifact defines its own options in a schematic. Schematic options are supplied to the command in the same format as immediate command options.

Prepares files for publish into an output directory named dist/ at the given output path. Must be executed from within a workspace directory.

With argument installs packages to project, without argument installs project dependencies.

Prepares files for publish into an output directory named dist/ at the given output path and executes ```setup.py```. Must be executed from within a library workspace directory.

Prepares files for publish into an output directory named dist/ at the given output path and executes 

Prepares files for publish into an output directory named dist/ at the given output path and executes ```setup.py```.

The command can be used to publish a project of type "console" or "library".

The command can be used to publish a project of type “console” or “library”.

The publish command builds the source files and then creates an ```setup.py``` with data from ```cpl_core.json```.
The command executes the ```setup.py``` and removes all source files with the ```setup.py``` from the 'publish/' directory.

The publish command builds the source files and then creates an 

Generated files of ```setup.py``` are in the 'publish/setup/' directory.

cpl **remove** *&lt;project&gt;* <br>
cpl **r** *&lt;project&gt;* <br>
cpl **R** *&lt;project&gt;*

Optional parameter to specify which project to start, if not set default project will be started.

cpl **uninstall** *&lt;package&gt;* <br>
cpl **ui** *&lt;package&gt;* <br>
cpl **UI** *&lt;package&gt;*

Lists the version of CPL, CPL CLI and all installed packages from pip.

Parameters:
config: :class:`cpl_core.configuration.configuration_abc.ConfigurationABC`
    Contains object loaded from appsettings
services: :class:`cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC`
    Contains instances of prepared objects

Contains object loaded from appsettings

Contains instances of prepared objects

configure() (cpl_core.application.application_abc.ApplicationABC method)

Called by :class:`cpl_core.application.application_abc.ApplicationABC.run`

main() (cpl_core.application.application_abc.ApplicationABC method)

run() (cpl_core.application.application_abc.ApplicationABC method)

run_async() (cpl_core.application.application_abc.ApplicationABC method)

ApplicationBuilder (class in cpl_core.application.application_builder)

This is class is used to build an object of :class:`cpl_core.application.application_abc.ApplicationABC`

Parameter:
app: Type[:class:`cpl_core.application.application_abc.ApplicationABC`]
    Application to build

Application to build

build() (cpl_core.application.application_builder.ApplicationBuilder method)

Returns:
Object of :class:`cpl_core.application.application_abc.ApplicationABC`

startup: Type[:class:`cpl_core.application.startup_abc.StartupABC`]
    Startup class to use

Startup class to use

ApplicationBuilderABC (class in cpl_core.application.application_builder_abc)

ABC for the :class:`cpl_core.application.application_builder.ApplicationBuilder`

[<#text: 'abstract'>, <desc_sig_space: <#text: ' '>>, <#text: 'async'>, <desc_sig_space: <#text: ' '>>]

ApplicationExtensionABC (class in cpl_core.application.application_extension_abc)

configure_configuration() (cpl_core.application.startup_abc.StartupABC method)

env: :class:`cpl_core.environment.application_environment_abc`

Returns:
Object of :class:`cpl_core.configuration.configuration_abc.ConfigurationABC`

configure_services() (cpl_core.application.startup_abc.StartupABC method)

services: :class:`cpl_core.dependency_injection.service_collection_abc`

Returns:
Object of :class:`cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC`

StartupExtensionABC (class in cpl_core.application.startup_extension_abc)

ArgumentABC(token: str, name: str, aliases: list[str], prevent_next_executable: bool = False, console_arguments: list['ArgumentABC'] | None = None)

token: str, name: str, aliases: list[str], prevent_next_executable: bool = False, console_arguments: list['ArgumentABC'] | None = None

add_console_argument() (cpl_core.configuration.argument_abc.ArgumentABC method)

ArgumentABC.add_console_argument(arg_type: ~cpl_core.configuration.argument_type_enum.ArgumentTypeEnum, *args, **kwargs) -> ~cpl_core.configuration.argument_abc.ArgumentABC

arg_type: ~cpl_core.configuration.argument_type_enum.ArgumentTypeEnum, *args, **kwargs

arg_type: :class:`str`
    Specifies the specific type of the argument

Specifies the specific type of the argument

Returns:
self :class:`cpl_core.configuration.console_argument.ConsoleArgument` not created argument!

aliases (cpl_core.configuration.argument_abc.ArgumentABC property)

console_arguments (cpl_core.configuration.argument_abc.ArgumentABC property)

token (cpl_core.configuration.argument_abc.ArgumentABC property)

ArgumentBuilder (class in cpl_core.configuration.argument_builder)

build_argument() (cpl_core.configuration.argument_builder.ArgumentBuilder static method)

ArgumentBuilder.build_argument(arg_type: ~cpl_core.configuration.argument_type_enum.ArgumentTypeEnum, *args, **kwargs) -> ~cpl_core.configuration.executable_argument.ExecutableArgument | ~cpl_core.configuration.flag_argument.FlagArgument | ~cpl_core.configuration.variable_argument.VariableArgument

ArgumentExecutableABC (class in cpl_core.configuration.argument_executable_abc)

ArgumentTypeEnum (class in cpl_core.configuration.argument_type_enum)

Flag (cpl_core.configuration.argument_type_enum.ArgumentTypeEnum attribute)

Variable (cpl_core.configuration.argument_type_enum.ArgumentTypeEnum attribute)

add_configuration() (cpl_core.configuration.configuration.Configuration method)

Configuration.add_configuration(key_type: ~cpl_core.type.T, value: any)

key_type: Union[:class:`str`, :class:`type`]
    Type of the value
value: any
    Object of the value

argument: :class:`cpl_core.configuration.console_argument.ConsoleArgumentABC`
    Specifies the console argument

Specifies the console argument

add_json_file() (cpl_core.configuration.configuration.Configuration method)

Configuration.add_json_file(name: str, optional: bool | None = None, output: bool = True, path: str | None = None)

name: str, optional: bool | None = None, output: bool = True, path: str | None = None

name: :class:`str`
    Name of the file
optional: :class:`str`
    Specifies whether an error should occur if the file was not found
output: :class:`bool`
    Specifies whether an output should take place
path: :class:`str`
    Path in which the file should be stored

Specifies whether an error should occur if the file was not found

Specifies whether an output should take place

arguments (cpl_core.configuration.configuration.Configuration property)

Configuration.create_console_argument(arg_type: ~cpl_core.configuration.argument_type_enum.ArgumentTypeEnum, token: str, name: str, aliases: list[str], *args, **kwargs) -> ~cpl_core.configuration.argument_abc.ArgumentABC

arg_type: ~cpl_core.configuration.argument_type_enum.ArgumentTypeEnum, token: str, name: str, aliases: list[str], *args, **kwargs

token: :class:`str`
    Specifies optional beginning of argument
name :class:`str`
    Specifies name of argument
aliases list[:class:`str`]
    Specifies possible aliases of name
value_token :class:`str`
    Specifies were the value begins
is_value_token_optional :class:`bool`
    Specifies if values are optional
runnable: :class:`cpl_core.configuration.console_argument.ConsoleArgumentABC`
    Specifies class to run when called if value is not None

Specifies if values are optional

Specifies class to run when called if value is not None

Returns:
Object of :class:`cpl_core.configuration.console_argument.ConsoleArgumentABC`

environment (cpl_core.configuration.configuration.Configuration property)

for_each_argument() (cpl_core.configuration.configuration.Configuration method)

get_configuration() (cpl_core.configuration.configuration.Configuration method)

Configuration.get_configuration(search_type: ~typing.Type[~cpl_core.type.T]) -> ~cpl_core.type.T | None

search_type: Union[:class:`str`, Type[:class:`cpl_core.configuration.configuration_model_abc.ConfigurationModelABC`]]
    Type to search for

Type to search for

Returns:
Object of Union[:class:`str`, :class:`cpl_core.configuration.configuration_model_abc.ConfigurationModelABC`]

Configuration.parse_console_arguments(services: ~cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC, error: bool | None = None) -> bool

services: ~cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC, error: bool | None = None

error: :class:`bool`
    Defines is invalid argument error will be shown or not

Defines is invalid argument error will be shown or not

ConfigurationABC (class in cpl_core.configuration.configuration_abc)

ConfigurationABC.add_configuration(key_type: ~cpl_core.type.T, value: any)

ConfigurationABC.add_json_file(name: str, optional: bool | None = None, output: bool = True, path: str | None = None)

[<#text: 'abstract'>, <desc_sig_space: <#text: ' '>>, <#text: 'property'>, <desc_sig_space: <#text: ' '>>]

arguments (cpl_core.configuration.configuration_abc.ConfigurationABC property)

ConfigurationABC.create_console_argument(arg_type: ~cpl_core.configuration.argument_type_enum.ArgumentTypeEnum, token: str, name: str, aliases: list[str], *args, **kwargs) -> ~cpl_core.configuration.argument_abc.ArgumentABC

environment (cpl_core.configuration.configuration_abc.ConfigurationABC property)

ConfigurationABC.get_configuration(search_type: ~typing.Type[~cpl_core.type.T]) -> ~cpl_core.type.T | None

ConfigurationABC.parse_console_arguments(services: ServiceProviderABC, error: bool = None) -> bool

ConfigurationModelABC (class in cpl_core.configuration.configuration_model_abc)

DEPRECATED: Set attributes as typed arguments in __init__ instead. See <> for further information
Converts attributes to dict

base_func() (in module cpl_core.configuration.configuration_model_abc)

ConfigurationVariableNameEnum (class in cpl_core.configuration.configuration_variable_name_enum)

to_list() (cpl_core.configuration.configuration_variable_name_enum.ConfigurationVariableNameEnum static method)

ExecutableArgument (class in cpl_core.configuration.executable_argument)

ExecutableArgument(token: str, name: str, aliases: list[str], executable: ~typing.Type[~cpl_core.configuration.argument_executable_abc.ArgumentExecutableABC], prevent_next_executable: bool = False, validators: list[typing.Type[cpl_core.configuration.validator_abc.ValidatorABC]] | None = None, console_arguments: list['ArgumentABC'] | None = None)

token: str, name: str, aliases: list[str], executable: ~typing.Type[~cpl_core.configuration.argument_executable_abc.ArgumentExecutableABC], prevent_next_executable: bool = False, validators: list[typing.Type[cpl_core.configuration.validator_abc.ValidatorABC]] | None = None, console_arguments: list['ArgumentABC'] | None = None

validators: list[Type[cpl_core.configuration.validator_abc.ValidatorABC]] | None = None

list[Type[cpl_core.configuration.validator_abc.ValidatorABC]] | None

run() (cpl_core.configuration.executable_argument.ExecutableArgument method)

FlagArgument(token: str, name: str, aliases: list[str], prevent_next_executable: bool = False, console_arguments: list['ArgumentABC'] | None = None)

validate() (cpl_core.configuration.validator_abc.ValidatorABC method)

VariableArgument (class in cpl_core.configuration.variable_argument)

VariableArgument(token: str, name: str, aliases: list[str], value_token: str, prevent_next_executable: bool = False, console_arguments: list['ArgumentABC'] | None = None)

token: str, name: str, aliases: list[str], value_token: str, prevent_next_executable: bool = False, console_arguments: list['ArgumentABC'] | None = None

set_value() (cpl_core.configuration.variable_argument.VariableArgument method)

value (cpl_core.configuration.variable_argument.VariableArgument property)

value_token (cpl_core.configuration.variable_argument.VariableArgument property)

BackgroundColorEnum (class in cpl_core.console.background_color_enum)

blue (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

cyan (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

default (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

green (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

grey (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

magenta (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

red (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

white (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

yellow (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)

[<#text: 'class'>, <desc_sig_space: <#text: ' '>>, <#text: 'property'>, <desc_sig_space: <#text: ' '>>]

str(object='') -> str
str(bytes_or_buffer[, encoding[, errors]]) -> str

str(object=’’) -> str

Create a new string object from the given object. If encoding or
errors is specified, then the object must expose a data buffer
that will be decoded using the given encoding and error handler.
Otherwise, returns the result of object.__str__() (if defined)
or repr(object).
encoding defaults to sys.getdefaultencoding().
errors defaults to 'strict'.

errors defaults to ‘strict’.

string: :class:`str`
    Error message
tb: :class:`str`
    Error traceback

output: :class:`str`
    String to print before input

reset_cursor_position() (cpl_core.console.console.Console class method)

Console.select(char: str, message: str, options: list[str], header_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum = ForegroundColorEnum.default, header_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum = BackgroundColorEnum.default, option_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum = ForegroundColorEnum.default, option_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum = BackgroundColorEnum.default, cursor_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum = ForegroundColorEnum.default, cursor_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum = BackgroundColorEnum.default) -> str

char: str, message: str, options: list[str], header_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum = ForegroundColorEnum.default, header_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum = BackgroundColorEnum.default, option_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum = ForegroundColorEnum.default, option_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum = BackgroundColorEnum.default, cursor_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum = ForegroundColorEnum.default, cursor_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum = BackgroundColorEnum.default

header_foreground_color: str | ForegroundColorEnum = ForegroundColorEnum.default

header_background_color: str | BackgroundColorEnum = BackgroundColorEnum.default

option_foreground_color: str | ForegroundColorEnum = ForegroundColorEnum.default

option_background_color: str | BackgroundColorEnum = BackgroundColorEnum.default

cursor_foreground_color: str | ForegroundColorEnum = ForegroundColorEnum.default

cursor_background_color: str | BackgroundColorEnum = BackgroundColorEnum.default

char: :class:`str`
    Character to show which element is selected
message: :class:`str`
    Message or header of the selection
options: List[:class:`str`]
    Selectable options
header_foreground_color: Union[:class:`str`, :class:`cpl_core.console.foreground_color_enum.ForegroundColorEnum`]
    Foreground color of the header
header_background_color: Union[:class:`str`, :class:`cpl_core.console.background_color_enum.BackgroundColorEnum`]
    Background color of the header
option_foreground_color: Union[:class:`str`, :class:`cpl_core.console.foreground_color_enum.ForegroundColorEnum`]
    Foreground color of the options
option_background_color: Union[:class:`str`, :class:`cpl_core.console.background_color_enum.BackgroundColorEnum`]
    Background color of the options
cursor_foreground_color: Union[:class:`str`, :class:`cpl_core.console.foreground_color_enum.ForegroundColorEnum`]
    Foreground color of the cursor
cursor_background_color: Union[:class:`str`, :class:`cpl_core.console.background_color_enum.BackgroundColorEnum`]
    Background color of the cursor

Foreground color of the header

Background color of the header

Foreground color of the options

Background color of the options

Foreground color of the cursor

Background color of the cursor

set_background_color() (cpl_core.console.console.Console class method)

Console.set_background_color(color: ~cpl_core.console.background_color_enum.BackgroundColorEnum | str)

color: ~cpl_core.console.background_color_enum.BackgroundColorEnum | str

color: Union[:class:`cpl_core.console.background_color_enum.BackgroundColorEnum`, :class:`str`]
    Background color of the console

Background color of the console

set_cursor_position() (cpl_core.console.console.Console class method)

x: :class:`int`
    X coordinate
y: :class:`int`
    Y coordinate

set_foreground_color() (cpl_core.console.console.Console class method)

Console.set_foreground_color(color: ~cpl_core.console.foreground_color_enum.ForegroundColorEnum | str)

color: ~cpl_core.console.foreground_color_enum.ForegroundColorEnum | str

    Foreground color of the console

Foreground color of the console

Console.spinner(message: str, call: ~collections.abc.Callable, *args, text_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum | None = None, spinner_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum | None = None, text_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum | None = None, spinner_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum | None = None, **kwargs) -> any

message: str, call: ~collections.abc.Callable, *args, text_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum | None = None, spinner_foreground_color: str | ~cpl_core.console.foreground_color_enum.ForegroundColorEnum | None = None, text_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum | None = None, spinner_background_color: str | ~cpl_core.console.background_color_enum.BackgroundColorEnum | None = None, **kwargs

spinner_foreground_color: str | ForegroundColorEnum | None = None

spinner_background_color: str | BackgroundColorEnum | None = None

Shows spinner and calls given function, when function has ended the spinner stops

    Message of the spinner
call: :class:`Callable`
    Function to call
args: :class:`list`
    Arguments of the function
text_foreground_color: Union[:class:`str`, :class:`cpl_core.console.foreground_color_enum.ForegroundColorEnum`]
    Foreground color of the text
spinner_foreground_color: Union[:class:`str`, :class:`cpl_core.console.foreground_color_enum.ForegroundColorEnum`]
    Foreground color of the spinner
text_background_color: Union[:class:`str`, :class:`cpl_core.console.background_color_enum.BackgroundColorEnum`]
    Background color of the text
spinner_background_color: Union[:class:`str`, :class:`cpl_core.console.background_color_enum.BackgroundColorEnum`]
    Background color of the spinner
kwargs: :class:`dict`
    Keyword arguments of the call

Foreground color of the text

Foreground color of the spinner

Background color of the text

Background color of the spinner

header: List[:class:`str`]
    Header of the table
values: List[List[:class:`str`]]
    Values of the table

    Elements to print
end: :class:`str`
    Last character to print

function: :class:`Callable`
    List of arguments

ForegroundColorEnum (class in cpl_core.console.foreground_color_enum)

blue (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

cyan (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

default (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

green (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

grey (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

magenta (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

red (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

white (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

yellow (cpl_core.console.foreground_color_enum.ForegroundColorEnum attribute)

SpinnerThread(msg_len: int, foreground_color: ~cpl_core.console.foreground_color_enum.ForegroundColorEnum, background_color: ~cpl_core.console.background_color_enum.BackgroundColorEnum)

msg_len: int, foreground_color: ~cpl_core.console.foreground_color_enum.ForegroundColorEnum, background_color: ~cpl_core.console.background_color_enum.BackgroundColorEnum

msg_len: :class:`int`
    Length of the message
foreground_color: :class:`cpl_core.console.foreground_color.ForegroundColorEnum`
background_color: :class:`cpl_core.console.background_color.BackgroundColorEnum`

stop_spinning() (cpl_core.console.spinner_thread.SpinnerThread method)

DatabaseSettings(host: str | None = None, port: int | None = None, user: str | None = None, password: str | None = None, databse: str | None = None, charset: str | None = None, use_unicode: bool | None = None, buffered: bool | None = None, auth_plugin: bool | None = None)

host: str | None = None, port: int | None = None, user: str | None = None, password: str | None = None, databse: str | None = None, charset: str | None = None, use_unicode: bool | None = None, buffered: bool | None = None, auth_plugin: bool | None = None

auth_plugin (cpl_core.database.database_settings.DatabaseSettings property)

buffered (cpl_core.database.database_settings.DatabaseSettings property)

charset (cpl_core.database.database_settings.DatabaseSettings property)

database (cpl_core.database.database_settings.DatabaseSettings property)

host (cpl_core.database.database_settings.DatabaseSettings property)

password (cpl_core.database.database_settings.DatabaseSettings property)

port (cpl_core.database.database_settings.DatabaseSettings property)

use_unicode (cpl_core.database.database_settings.DatabaseSettings property)

user (cpl_core.database.database_settings.DatabaseSettings property)

DatabaseSettingsNameEnum (class in cpl_core.database.database_settings_name_enum)

DatabaseConnection (class in cpl_core.database.connection.database_connection)

connection_string: :class:`str`
    Database connection string, see: https://docs.sqlalchemy.org/en/14/core/engines.html

Database connection string, see: https://docs.sqlalchemy.org/en/14/core/engines.html

DatabaseConnectionABC (class in cpl_core.database.connection.database_connection_abc)

ABC for the :class:`cpl_core.database.connection.database_connection.DatabaseConnection`

DatabaseContext (class in cpl_core.database.context.database_context)

database_settings: :class:`cpl_core.database.database_settings.DatabaseSettings`

connect() (cpl_core.database.context.database_context.DatabaseContext method)

cursor (cpl_core.database.context.database_context.DatabaseContext property)

select() (cpl_core.database.context.database_context.DatabaseContext method)

DatabaseContextABC (class in cpl_core.database.context.database_context_abc)

ABC for the :class:`cpl_core.database.context.database_context.DatabaseContext`

service_provider (cpl_core.dependency_injection.scope.Scope property)

Returns:
Object of type :class:`cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC`

ABC for the class :class:`cpl_core.dependency_injection.scope.Scope`

dispose() (cpl_core.dependency_injection.scope_abc.ScopeABC method)

service_provider (cpl_core.dependency_injection.scope_abc.ScopeABC property)

ScopeBuilder (class in cpl_core.dependency_injection.scope_builder)

Class to build :class:`cpl_core.dependency_injection.scope.Scope`

build() (cpl_core.dependency_injection.scope_builder.ScopeBuilder method)

ScopeBuilder.build() -> ~cpl_core.dependency_injection.scope_abc.ScopeABC

Returns:
Object of type :class:`cpl_core.dependency_injection.scope.Scope`

ServiceCollection (class in cpl_core.dependency_injection.service_collection)

db_context: Type[:class:`cpl_core.database.context.database_context_abc.DatabaseContextABC`]
    Database context

Database context

ServiceCollection.add_scoped(service_type: ~cpl_core.type.T, service: ~typing.Callable | None = None)

service_type: ~cpl_core.type.T, service: ~typing.Callable | None = None

service_type: :class:`Type`
    Type of the service
service: :class:`Callable`
    Object of the service

ServiceCollection.add_singleton(service_type: ~cpl_core.type.T, service: ~cpl_core.type.T | None = None)

service_type: ~cpl_core.type.T, service: ~cpl_core.type.T | None = None

ServiceCollection.add_transient(service_type: ~cpl_core.type.T, service: ~cpl_core.type.T | None = None)

ServiceCollectionABC (class in cpl_core.dependency_injection.service_collection_abc)

ABC for the class :class:`cpl_core.dependency_injection.service_collection.ServiceCollection`

ServiceCollectionABC.add_scoped(service_type: ~cpl_core.type.T, service: ~cpl_core.type.T | None = None) -> ~cpl_core.dependency_injection.service_collection_abc.ServiceCollectionABC

ServiceCollectionABC.add_singleton(service_type: ~cpl_core.type.T, service: ~cpl_core.type.T | None = None) -> ~cpl_core.dependency_injection.service_collection_abc.ServiceCollectionABC

ServiceCollectionABC.add_transient(service_type: ~cpl_core.type.T, service: ~cpl_core.type.T | None = None) -> ~cpl_core.dependency_injection.service_collection_abc.ServiceCollectionABC

ServiceDescriptor (class in cpl_core.dependency_injection.service_descriptor)

ServiceDescriptor(implementation: type | object | None, lifetime: ~cpl_core.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum, base_type=None)

implementation: type | object | None, lifetime: ~cpl_core.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum, base_type=None

implementation: Union[:class:`type`, Optional[:class:`object`]]
    Object or type of service
lifetime: :class:`cpl_core.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum`
    Lifetime of the service

Object or type of service

Lifetime of the service

ServiceLifetimeEnum (class in cpl_core.dependency_injection.service_lifetime_enum)

ServiceProvider (class in cpl_core.dependency_injection.service_provider)

ServiceProvider(service_descriptors: list[cpl_core.dependency_injection.service_descriptor.ServiceDescriptor], config: ~cpl_core.configuration.configuration_abc.ConfigurationABC, db_context: ~cpl_core.database.context.database_context_abc.DatabaseContextABC | None)

service_descriptors: list[cpl_core.dependency_injection.service_descriptor.ServiceDescriptor], config: ~cpl_core.configuration.configuration_abc.ConfigurationABC, db_context: ~cpl_core.database.context.database_context_abc.DatabaseContextABC | None

service_descriptors: list[:class:`cpl_core.dependency_injection.service_descriptor.ServiceDescriptor`]
    Descriptor of the service
    CPL Configuration
db_context: Optional[:class:`cpl_core.database.context.database_context_abc.DatabaseContextABC`]
    Database representation

Descriptor of the service

CPL Configuration

Database representation

ServiceProvider.build_by_signature(sig: ~inspect.Signature) -> list[~T]

ServiceProvider.build_service(service_type: type, *args, **kwargs) -> object

instance_type: :class:`type`
    The type of the searched instance

Object of type :class:`cpl_core.dependency_injection.scope_abc.ScopeABC`

ServiceProvider.get_service(service_type: ~cpl_core.type.T, *args, **kwargs) -> ~cpl_core.type.T | None

instance_type: :class:`cpl_core.type.T`

The type of the searched instance

ServiceProvider.get_services(service_type: ~cpl_core.type.T, *args, **kwargs) -> list[typing.Optional[~T]]

    Service scope

Service scope

ServiceProviderABC (class in cpl_core.dependency_injection.service_provider_abc)

ABC for the class :class:`cpl_core.dependency_injection.service_provider.ServiceProvider`

ServiceProviderABC.build_by_signature(sig: ~inspect.Signature) -> list[~T]

ServiceProviderABC.build_service(service_type: type, *args, **kwargs) -> object

ServiceProviderABC.get_service(instance_type: ~cpl_core.type.T, *args, **kwargs) -> ~cpl_core.type.T | None

ServiceProviderABC.get_services(service_type: ~cpl_core.type.T, *args, **kwargs) -> list[typing.Optional[~T]]

inject() (cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC class method)

set_global_provider() (cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC class method)

ApplicationEnvironment (class in cpl_core.environment.application_environment)

name: ~cpl_core.environment.environment_name_enum.EnvironmentNameEnum = EnvironmentNameEnum.production

name: :class:`cpl_core.environment.environment_name_enum.EnvironmentNameEnum`

runtime_directory: :class:`str`
    Path of the runtime directory

working_directory: :class:`str`
    Path of the current working directory

Path of the current working directory

ApplicationEnvironmentABC (class in cpl_core.environment.application_environment_abc)

ABC of the class :class:`cpl_core.environment.application_environment.ApplicationEnvironment`

EnvironmentNameEnum (class in cpl_core.environment.environment_name_enum)

    Message name
    Message string

LoggerABC.error(name: str, message: str, ex: Exception | None = None)

    Error name
ex: :class:`Exception`
    Thrown exception

LoggerABC.fatal(name: str, message: str, ex: Exception | None = None)

logging_settings: :class:`cpl_core.logging.logging_settings.LoggingSettings`
    Settings for the logger
time_format: :class:`cpl_core.time.time_format_settings.TimeFormatSettings`
    Time format settings
env: :class:`cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC`
    Environment of the application

Settings for the logger

Time format settings

Environment of the application

Logger.error(name: str, message: str, ex: Exception | None = None)

Logger.fatal(name: str, message: str, ex: Exception | None = None)

DEBUG (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)

ERROR (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)

FATAL (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)

INFO (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)

OFF (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)

TRACE (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)

WARN (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)

LoggingSettings(path: str | None = None, filename: str | None = None, console_log_level: ~cpl_core.logging.logging_level_enum.LoggingLevelEnum | None = None, file_log_level: ~cpl_core.logging.logging_level_enum.LoggingLevelEnum | None = None)

path: str | None = None, filename: str | None = None, console_log_level: ~cpl_core.logging.logging_level_enum.LoggingLevelEnum | None = None, file_log_level: ~cpl_core.logging.logging_level_enum.LoggingLevelEnum | None = None

console (cpl_core.logging.logging_settings.LoggingSettings property)

filename (cpl_core.logging.logging_settings.LoggingSettings property)

level (cpl_core.logging.logging_settings.LoggingSettings property)

path (cpl_core.logging.logging_settings.LoggingSettings property)

LoggingSettingsNameEnum (class in cpl_core.logging.logging_settings_name_enum)

EMail(header: list[str] | None = None, subject: str | None = None, body: str | None = None, transceiver: str | None = None, receiver: list[str] | None = None)

header: list[str] | None = None, subject: str | None = None, body: str | None = None, transceiver: str | None = None, receiver: list[str] | None = None

header: list[:class:`str`]
    Header of the E-Mail
subject: :class:`str`
    Subject of the E-Mail
body: :class:`str`
    Body of the E-Mail
transceiver: :class:`str`
    Transceiver of the E-Mail
receiver: list[:class:`str`]
    Receiver of the E-Mail

receiver: :class:`str`
    The receiver of the E-Mail

    The transceiver of the E-Mail

ABC of :class:`cpl_core.mailing.email_client_service.EMailClient`

connect() (cpl_core.mailing.email_client_abc.EMailClientABC method)

send_mail() (cpl_core.mailing.email_client_abc.EMailClientABC method)

email: :class:`cpl_core.mailing.email.EMail`
    Object of the E-Mail to send

Object of the E-Mail to send

environment: :class:`cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC`
logger: :class:`cpl_core.logging.logger_abc.LoggerABC`
    The logger to use
mail_settings: :class:`cpl_core.mailing.email_client_settings.EMailClientSettings`
    Settings for mailing

The logger to use

Settings for mailing

connect() (cpl_core.mailing.email_client_service.EMailClient method)

create() (cpl_core.mailing.email_client_service.EMailClient method)

login() (cpl_core.mailing.email_client_service.EMailClient method)

send_mail() (cpl_core.mailing.email_client_service.EMailClient method)

EMailClientSettings (class in cpl_core.mailing.email_client_settings)

EMailClientSettings(host: str | None = None, port: int | None = None, user_name: str | None = None, credentials: str | None = None)

host: str | None = None, port: int | None = None, user_name: str | None = None, credentials: str | None = None

host (cpl_core.mailing.email_client_settings.EMailClientSettings property)

port (cpl_core.mailing.email_client_settings.EMailClientSettings property)

user_name (cpl_core.mailing.email_client_settings.EMailClientSettings property)

EMailClientSettingsNameEnum (class in cpl_core.mailing.email_client_settings_name_enum)

FirstCharToLowerPipe (class in cpl_core.pipes.first_char_to_lower_pipe)

transform() (cpl_core.pipes.first_to_upper_pipe.FirstToUpperPipe method)

transform() (cpl_core.pipes.ip_address_pipe.IPAddressPipe method)

transform() (cpl_core.pipes.to_camel_case_pipe.ToCamelCasePipe method)

transform() (cpl_core.pipes.to_snake_case_pipe.ToSnakeCasePipe method)

TimeFormatSettings (class in cpl_core.time.time_format_settings)

TimeFormatSettings(date_format: str | None = None, time_format: str | None = None, date_time_format: str | None = None, date_time_log_format: str | None = None)

date_format: str | None = None, time_format: str | None = None, date_time_format: str | None = None, date_time_log_format: str | None = None

date_format (cpl_core.time.time_format_settings.TimeFormatSettings property)

time_format (cpl_core.time.time_format_settings.TimeFormatSettings property)

TimeFormatSettingsNamesEnum (class in cpl_core.time.time_format_settings_names_enum)

build_string() (cpl_core.utils.credential_manager.CredentialManager static method)

    String in which the variable is replaced by credentials
credentials: :class:`str`
    String to encode

String in which the variable is replaced by credentials

decrypt() (cpl_core.utils.credential_manager.CredentialManager static method)

encrypt() (cpl_core.utils.credential_manager.CredentialManager static method)

Pip.install(package: str, *args, source: str | None = None, stdout=None, stderr=None)

package: str, *args, source: str | None = None, stdout=None, stderr=None

package: :class:`str`
    The name of the package
    Arguments for the command
source: :class:`str`
    Extra index URL
stdout: :class:`str`
    Stdout of subprocess.run
stderr: :class:`str`
    Stderr of subprocess.run

convert_to_camel_case() (cpl_core.utils.string.String static method)

convert_to_snake_case() (cpl_core.utils.string.String static method)

DiscordEventTypesEnum (class in cpl_discord.discord_event_types_enum)

on_error (cpl_discord.discord_event_types_enum.DiscordEventTypesEnum attribute)

on_ready (cpl_discord.discord_event_types_enum.DiscordEventTypesEnum attribute)

on_resume (cpl_discord.discord_event_types_enum.DiscordEventTypesEnum attribute)

on_typing (cpl_discord.discord_event_types_enum.DiscordEventTypesEnum attribute)

DiscordBotApplicationABC (class in cpl_discord.application.discord_bot_application_abc)

DiscordCommandABC (class in cpl_discord.command.discord_command_abc)

Bases: :py:class:`~abc.ABC`, :py:class:`~discord.ext.commands.cog.Cog`

DiscordCogMeta (class in cpl_discord.command.discord_commands_meta)

Bases: :py:class:`~abc.ABCMeta`, :py:class:`~discord.ext.commands.cog.CogMeta`

DiscordBotSettings (class in cpl_discord.configuration.discord_bot_settings)

DiscordBotSettings(token: str | None = None, prefix: str | None = None)

CategoryChannel (class in cpl_discord.container.category_channel)

category_id (cpl_discord.container.category_channel.CategoryChannel attribute)

guild (cpl_discord.container.category_channel.CategoryChannel attribute)

id (cpl_discord.container.category_channel.CategoryChannel attribute)

name (cpl_discord.container.category_channel.CategoryChannel attribute)

nsfw (cpl_discord.container.category_channel.CategoryChannel attribute)

position (cpl_discord.container.category_channel.CategoryChannel attribute)

text_channels (cpl_discord.container.category_channel.CategoryChannel property)

List[:class:`TextChannel`]: Returns the text channels that are under this category.

voice_channels (cpl_discord.container.category_channel.CategoryChannel property)

List[:class:`VoiceChannel`]: Returns the voice channels that are under this category.

approximate_member_count (cpl_discord.container.guild.Guild attribute)

approximate_presence_count (cpl_discord.container.guild.Guild attribute)

List[:class:`CategoryChannel`]: A list of categories that belongs to this guild.

This is sorted by the position and are in UI order from top to bottom.

default_notifications (cpl_discord.container.guild.Guild attribute)

explicit_content_filter (cpl_discord.container.guild.Guild attribute)

max_video_channel_users (cpl_discord.container.guild.Guild attribute)

Sequence[:class:`Member`]: A list of members that belong to this guild.

premium_progress_bar_enabled (cpl_discord.container.guild.Guild attribute)

premium_subscription_count (cpl_discord.container.guild.Guild attribute)

Sequence[:class:`Role`]: Returns a sequence of the guild's roles in hierarchy order.

The first element of this sequence will be the lowest role in the
hierarchy.

List[:class:`TextChannel`]: A list of text channels that belongs to this guild.

Sequence[:class:`Thread`]: A list of threads that you have permission to view.

verification_level (cpl_discord.container.guild.Guild attribute)

List[:class:`VoiceChannel`]: A list of voice channels that belongs to this guild.

List[:class:`Role`]: A :class:`list` of :class:`Role` that the member belongs to. Note
that the first element of this list is always the default '@everyone'
role.

 that the member belongs to. Note
that the first element of this list is always the default 

category_id (cpl_discord.container.text_channel.TextChannel attribute)

guild (cpl_discord.container.text_channel.TextChannel attribute)

last_message_id (cpl_discord.container.text_channel.TextChannel attribute)

members (cpl_discord.container.text_channel.TextChannel property)

List[:class:`Member`]: Returns all members that can see this channel.

position (cpl_discord.container.text_channel.TextChannel attribute)

slowmode_delay (cpl_discord.container.text_channel.TextChannel attribute)

threads (cpl_discord.container.text_channel.TextChannel property)

List[:class:`Thread`]: Returns all the threads that you can see.

topic (cpl_discord.container.text_channel.TextChannel attribute)

archive_timestamp (cpl_discord.container.thread.Thread attribute)

auto_archive_duration (cpl_discord.container.thread.Thread attribute)

List[:class:`ThreadMember`]: A list of thread members in this thread.

This requires :attr:`Intents.members` to be properly filled. Most of the time however,
this data is not provided by the gateway and a call to :meth:`fetch_members` is
needed.

 to be properly filled. Most of the time however,
this data is not provided by the gateway and a call to 

members (cpl_discord.container.voice_channel.VoiceChannel property)

List[:class:`Member`]: Returns all members that are currently inside this voice channel.

]: Returns all members that are currently inside this voice channel.

OnBulkMessageDeleteABC (class in cpl_discord.events.on_bulk_message_delete_abc)

on_command() (cpl_discord.events.on_command_abc.OnCommandABC method)

OnCommandCompletionABC (class in cpl_discord.events.on_command_completion_abc)

OnCommandErrorABC (class in cpl_discord.events.on_command_error_abc)

ctx: ~discord.ext.commands.context.Context, error: ~discord.ext.commands.errors.CommandError

on_connect() (cpl_discord.events.on_connect_abc.OnConnectABC method)

on_disconnect() (cpl_discord.events.on_disconnect_abc.OnDisconnectABC method)

on_group_join() (cpl_discord.events.on_group_join_abc.OnGroupJoinABC method)

OnGroupJoinABC.on_group_join(channel: ~discord.channel.GroupChannel, user: ~discord.user.User)

channel: ~discord.channel.GroupChannel, user: ~discord.user.User

OnGroupRemoveABC (class in cpl_discord.events.on_group_remove_abc)

OnGroupRemoveABC.on_group_remove(chhanel: ~discord.channel.GroupChannel, user: ~discord.user.User)

chhanel: ~discord.channel.GroupChannel, user: ~discord.user.User

OnGuildAvailableABC (class in cpl_discord.events.on_guild_available_abc)

OnGuildChannelCreateABC (class in cpl_discord.events.on_guild_channel_create_abc)

OnGuildChannelDeleteABC (class in cpl_discord.events.on_guild_channel_delete_abc)

OnGuildChannelPinsUpdateABC (class in cpl_discord.events.on_guild_channel_pins_update_abc)

OnGuildChannelPinsUpdateABC.on_guild_channel_pins_update(channel: ~discord.abc.GuildChannel, list_pin: ~datetime.datetime | None)

channel: ~discord.abc.GuildChannel, list_pin: ~datetime.datetime | None

OnGuildChannelUpdateABC (class in cpl_discord.events.on_guild_channel_update_abc)

OnGuildChannelUpdateABC.on_guild_channel_update(before: ~discord.abc.GuildChannel, after: ~discord.abc.GuildChannel)

before: ~discord.abc.GuildChannel, after: ~discord.abc.GuildChannel

OnGuildEmojisUpdateABC (class in cpl_discord.events.on_guild_emojis_update_abc)

OnGuildEmojisUpdateABC.on_guild_emojis_update(guild: ~discord.guild.Guild, before: ~typing.Sequence[~discord.emoji.Emoji], after: ~typing.Sequence[~discord.emoji.Emoji])

guild: ~discord.guild.Guild, before: ~typing.Sequence[~discord.emoji.Emoji], after: ~typing.Sequence[~discord.emoji.Emoji]

OnGuildIntegrationsUpdateABC (class in cpl_discord.events.on_guild_integrations_update_abc)

on_guild_join() (cpl_discord.events.on_guild_join_abc.OnGuildJoinABC method)

OnGuildRemoveABC (class in cpl_discord.events.on_guild_remove_abc)

OnGuildRoleCreateABC (class in cpl_discord.events.on_guild_role_create_abc)

OnGuildRoleDeleteABC (class in cpl_discord.events.on_guild_role_delete_abc)

OnGuildRoleUpdateABC (class in cpl_discord.events.on_guild_role_update_abc)

OnGuildRoleUpdateABC.on_guild_role_update(before: ~discord.role.Role, after: ~discord.role.Role)

OnGuildUnavailableABC (class in cpl_discord.events.on_guild_unavailable_abc)

OnGuildUpdateABC (class in cpl_discord.events.on_guild_update_abc)

OnGuildUpdateABC.on_guild_update(before: ~discord.guild.Guild, after: ~discord.guild.Guild)

OnInviteCreateABC (class in cpl_discord.events.on_invite_create_abc)

OnInviteDeleteABC (class in cpl_discord.events.on_invite_delete_abc)

on_member_ban() (cpl_discord.events.on_member_ban_abc.OnMemberBanABC method)

OnMemberBanABC.on_member_ban(guild: ~discord.guild.Guild, user: ~discord.user.User)

OnMemberJoinABC (class in cpl_discord.events.on_member_join_abc)

on_member_join() (cpl_discord.events.on_member_join_abc.OnMemberJoinABC method)

OnMemberRemoveABC (class in cpl_discord.events.on_member_remove_abc)

OnMemberUnbanABC (class in cpl_discord.events.on_member_unban_abc)

OnMemberUnbanABC.on_member_unban(guild: ~discord.guild.Guild, user: ~discord.user.User)

OnMemberUpdateABC (class in cpl_discord.events.on_member_update_abc)

OnMemberUpdateABC.on_member_update(before: ~discord.member.Member, after: ~discord.member.Member)

on_message() (cpl_discord.events.on_message_abc.OnMessageABC method)

OnMessageDeleteABC (class in cpl_discord.events.on_message_delete_abc)

OnMessageEditABC (class in cpl_discord.events.on_message_edit_abc)

OnMessageEditABC.on_message_edit(before: ~discord.message.Message, after: ~discord.message.Message)

before: ~discord.message.Message, after: ~discord.message.Message

OnPrivateChannelCreateABC (class in cpl_discord.events.on_private_channel_create_abc)

OnPrivateChannelDeleteABC (class in cpl_discord.events.on_private_channel_delete_abc)

OnPrivateChannelPinsUpdateABC (class in cpl_discord.events.on_private_channel_pins_update_abc)

OnPrivateChannelPinsUpdateABC.on_private_channel_pins_update(channel: ~discord.abc.PrivateChannel, list_pin: ~datetime.datetime | None)

channel: ~discord.abc.PrivateChannel, list_pin: ~datetime.datetime | None

OnPrivateChannelUpdateABC (class in cpl_discord.events.on_private_channel_update_abc)

before: ~discord.channel.GroupChannel, after: ~discord.channel.GroupChannel

OnRawReactionAddABC (class in cpl_discord.events.on_raw_reaction_add_abc)

OnRawReactionClearABC (class in cpl_discord.events.on_raw_reaction_clear_abc)

OnRawReactionClearEmojiABC (class in cpl_discord.events.on_raw_reaction_clear_emoji_abc)

OnRawReactionRemoveABC (class in cpl_discord.events.on_raw_reaction_remove_abc)

OnReactionAddABC (class in cpl_discord.events.on_reaction_add_abc)

OnReactionAddABC.on_reaction_add(reaction: ~discord.reaction.Reaction, user: ~discord.user.User)

OnReactionClearABC (class in cpl_discord.events.on_reaction_clear_abc)

OnReactionClearABC.on_reaction_clear(message: ~discord.message.Message, reactions: list[discord.reaction.Reaction])

message: ~discord.message.Message, reactions: list[discord.reaction.Reaction]

OnReactionClearEmojiABC (class in cpl_discord.events.on_reaction_clear_emoji_abc)

OnReactionRemoveABC (class in cpl_discord.events.on_reaction_remove_abc)

OnReactionRemoveABC.on_reaction_remove(reaction: ~discord.reaction.Reaction, user: ~discord.user.User)

on_resume() (cpl_discord.events.on_resume_abc.OnResumeABC method)

on_typing() (cpl_discord.events.on_typing_abc.OnTypingABC method)

OnTypingABC.on_typing(channel: ~discord.abc.Messageable, user: ~discord.user.User | ~discord.member.Member, when: ~datetime.datetime)

channel: ~discord.abc.Messageable, user: ~discord.user.User | ~discord.member.Member, when: ~datetime.datetime

OnUserUpdateABC (class in cpl_discord.events.on_user_update_abc)

on_user_update() (cpl_discord.events.on_user_update_abc.OnUserUpdateABC method)

OnUserUpdateABC.on_user_update(before: ~discord.user.User, after: ~discord.user.User)

OnVoiceStateUpdateABC (class in cpl_discord.events.on_voice_state_update_abc)

OnVoiceStateUpdateABC.on_voice_state_update(member: ~discord.member.Member, before: ~discord.member.VoiceState, after: ~discord.member.VoiceState)

member: ~discord.member.Member, before: ~discord.member.VoiceState, after: ~discord.member.VoiceState

OnWebhooksUpdateABC (class in cpl_discord.events.on_webhooks_update_abc)

ToContainersConverter (class in cpl_discord.helper.to_containers_converter)

convert() (cpl_discord.helper.to_containers_converter.ToContainersConverter static method)

ToContainersConverter.convert(_l: list[object] | ~typing.Sequence[object], _t: type) -> list[cpl_discord.container.container.Container]

CommandErrorHandlerService (class in cpl_discord.service.command_error_handler_service)

DiscordBotService (class in cpl_discord.service.discord_bot_service)

DiscordBotService(config: ~cpl_core.configuration.configuration_abc.ConfigurationABC, logger: ~cpl_core.logging.logger_abc.LoggerABC, discord_bot_settings: ~cpl_discord.configuration.discord_bot_settings.DiscordBotSettings, env: ~cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC, logging_st: ~cpl_core.logging.logging_settings.LoggingSettings, discord_service: ~cpl_discord.service.discord_service_abc.DiscordServiceABC, *args, **kwargs)

config: ~cpl_core.configuration.configuration_abc.ConfigurationABC, logger: ~cpl_core.logging.logger_abc.LoggerABC, discord_bot_settings: ~cpl_discord.configuration.discord_bot_settings.DiscordBotSettings, env: ~cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC, logging_st: ~cpl_core.logging.logging_settings.LoggingSettings, discord_service: ~cpl_discord.service.discord_service_abc.DiscordServiceABC, *args, **kwargs

guilds (cpl_discord.service.discord_bot_service.DiscordBotService property)

Sequence[:class:`.Guild`]: The guilds that the connected client is a member of.

on_ready() (cpl_discord.service.discord_bot_service.DiscordBotService method)

start_async() (cpl_discord.service.discord_bot_service.DiscordBotService method)

stop_async() (cpl_discord.service.discord_bot_service.DiscordBotService method)

DiscordBotServiceABC (class in cpl_discord.service.discord_bot_service_abc)

DiscordCollection (class in cpl_discord.service.discord_collection)

add_command() (cpl_discord.service.discord_collection.DiscordCollection method)

add_event() (cpl_discord.service.discord_collection.DiscordCollection method)

DiscordCollection.add_event(_t_event: ~typing.Type, _t: ~typing.Type)

get_commands() (cpl_discord.service.discord_collection.DiscordCollection method)

DiscordCollection.get_events_by_base(_t_event: ~typing.Type) -> ~cpl_query.extension.list.List | None

DiscordCollectionABC (class in cpl_discord.service.discord_collection_abc)

DiscordCollectionABC.add_event(_t_event: ~typing.Type, _t: ~typing.Type)

init() (cpl_discord.service.discord_service.DiscordService method)

on_command() (cpl_discord.service.discord_service.DiscordService method)

on_command_error() (cpl_discord.service.discord_service.DiscordService method)

on_connect() (cpl_discord.service.discord_service.DiscordService method)

on_disconnect() (cpl_discord.service.discord_service.DiscordService method)

on_error() (cpl_discord.service.discord_service.DiscordService method)

on_group_join() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_group_join(channel: ~discord.channel.GroupChannel, user: ~discord.user.User)

on_group_remove() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_group_remove(channel: ~discord.channel.GroupChannel, user: ~discord.user.User)

on_guild_available() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_guild_channel_pins_update(channel: ~discord.abc.GuildChannel, list_pin: ~datetime.datetime | None)

DiscordService.on_guild_channel_update(before: ~discord.abc.GuildChannel, after: ~discord.abc.GuildChannel)

DiscordService.on_guild_emojis_update(guild: ~discord.guild.Guild, before: ~typing.Sequence[~discord.emoji.Emoji], after: ~typing.Sequence[~discord.emoji.Emoji])

on_guild_join() (cpl_discord.service.discord_service.DiscordService method)

on_guild_remove() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_guild_role_update(before: ~discord.role.Role, after: ~discord.role.Role)

on_guild_update() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_guild_update(before: ~discord.guild.Guild, after: ~discord.guild.Guild)

on_invite_create() (cpl_discord.service.discord_service.DiscordService method)

on_invite_delete() (cpl_discord.service.discord_service.DiscordService method)

on_member_ban() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_member_ban(guild: ~discord.guild.Guild, user: ~discord.user.User)

on_member_join() (cpl_discord.service.discord_service.DiscordService method)

on_member_remove() (cpl_discord.service.discord_service.DiscordService method)

on_member_unban() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_member_unban(guild: ~discord.guild.Guild, user: ~discord.user.User)

on_member_update() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_member_update(before: ~discord.member.Member, after: ~discord.member.Member)

on_message() (cpl_discord.service.discord_service.DiscordService method)

on_message_delete() (cpl_discord.service.discord_service.DiscordService method)

on_message_edit() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_message_edit(before: ~discord.message.Message, after: ~discord.message.Message)

DiscordService.on_private_channel_pins_update(channel: ~discord.abc.PrivateChannel, list_pin: ~datetime.datetime | None)

DiscordService.on_private_channel_update(before: ~discord.channel.GroupChannel, after: ~discord.channel.GroupChannel)

on_reaction_add() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_reaction_add(reaction: ~discord.reaction.Reaction, user: ~discord.user.User)

on_reaction_clear() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_reaction_clear(message: ~discord.message.Message, reactions: list[discord.reaction.Reaction])

on_reaction_remove() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_reaction_remove(reaction: ~discord.reaction.Reaction, user: ~discord.user.User)

on_ready() (cpl_discord.service.discord_service.DiscordService method)

on_resume() (cpl_discord.service.discord_service.DiscordService method)

before: ~discord.scheduled_event.ScheduledEvent, after: ~discord.scheduled_event.ScheduledEvent

DiscordService.on_scheduled_event_user_add(event: ~discord.scheduled_event.ScheduledEvent, user: ~discord.user.User)

event: ~discord.scheduled_event.ScheduledEvent, user: ~discord.user.User

DiscordService.on_scheduled_event_user_remove(event: ~discord.scheduled_event.ScheduledEvent, user: ~discord.user.User)

on_typing() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_typing(channel: ~discord.abc.Messageable, user: ~discord.user.User | ~discord.member.Member, when: ~datetime.datetime)

on_user_update() (cpl_discord.service.discord_service.DiscordService method)

DiscordService.on_user_update(before: ~discord.user.User, after: ~discord.user.User)

DiscordService.on_voice_state_update(member: ~discord.member.Member, before: ~discord.member.VoiceState, after: ~discord.member.VoiceState)

on_webhooks_update() (cpl_discord.service.discord_service.DiscordService method)

DiscordServiceABC (class in cpl_discord.service.discord_service_abc)

init() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

on_command() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

on_connect() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

on_error() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

DiscordServiceABC.on_group_join(chhanel: ~discord.channel.GroupChannel, user: ~discord.user.User)

DiscordServiceABC.on_group_remove(chhanel: ~discord.channel.GroupChannel, user: ~discord.user.User)

DiscordServiceABC.on_guild_channel_pins_update(channel: ~discord.abc.GuildChannel, list_pin: ~datetime.datetime | None)

DiscordServiceABC.on_guild_channel_update(before: ~discord.abc.GuildChannel, after: ~discord.abc.GuildChannel)

DiscordServiceABC.on_guild_emojis_update(guild: ~discord.guild.Guild, before: ~typing.Sequence[~discord.emoji.Emoji], after: ~typing.Sequence[~discord.emoji.Emoji])

DiscordServiceABC.on_guild_role_update(before: ~discord.role.Role, after: ~discord.role.Role)

DiscordServiceABC.on_guild_update(before: ~discord.guild.Guild, after: ~discord.guild.Guild)

DiscordServiceABC.on_member_ban(guild: ~discord.guild.Guild, user: ~discord.user.User)

DiscordServiceABC.on_member_unban(guild: ~discord.guild.Guild, user: ~discord.user.User)

DiscordServiceABC.on_member_update(before: ~discord.member.Member, after: ~discord.member.Member)

on_message() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

DiscordServiceABC.on_message_edit(before: ~discord.message.Message, after: ~discord.message.Message)

DiscordServiceABC.on_private_channel_pins_update(channel: ~discord.abc.PrivateChannel, list_pin: ~datetime.datetime | None)

DiscordServiceABC.on_private_channel_update(before: ~discord.channel.GroupChannel, after: ~discord.channel.GroupChannel)

DiscordServiceABC.on_reaction_add(reaction: ~discord.reaction.Reaction, user: ~discord.user.User)

DiscordServiceABC.on_reaction_clear(message: ~discord.message.Message, reactions: list[discord.reaction.Reaction])

DiscordServiceABC.on_reaction_remove(reaction: ~discord.reaction.Reaction, user: ~discord.user.User)

on_ready() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

on_resume() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

on_typing() (cpl_discord.service.discord_service_abc.DiscordServiceABC method)

DiscordServiceABC.on_typing(channel: ~discord.abc.Messageable, user: ~discord.user.User | ~discord.member.Member, when: ~datetime.datetime)

DiscordServiceABC.on_user_update(before: ~discord.user.User, after: ~discord.user.User)

DiscordServiceABC.on_voice_state_update(member: ~discord.member.Member, before: ~discord.member.VoiceState, after: ~discord.member.VoiceState)

OrderedQueryable(_t: type, _values: ~cpl_query.iterable.iterable.Iterable | None = None, _func: ~collections.abc.Callable | None = None)

_t: type, _values: ~cpl_query.iterable.iterable.Iterable | None = None, _func: ~collections.abc.Callable | None = None

Implementation of :class: `cpl_query.base.ordered_queryable_abc.OrderedQueryableABC`

then_by() (cpl_query.base.ordered_queryable.OrderedQueryable method)

OrderedQueryable.then_by(_func: ~collections.abc.Callable) -> ~cpl_query.base.ordered_queryable_abc.OrderedQueryableABC

Returns:
list of :class:`cpl_query.base.ordered_queryable_abc.OrderedQueryableABC`

then_by_descending() (cpl_query.base.ordered_queryable.OrderedQueryable method)

OrderedQueryableABC (class in cpl_query.base.ordered_queryable_abc)

OrderedQueryableABC(_t: type, _values: ~typing.Iterable | None = None, _func: ~collections.abc.Callable | None = None)

_t: type, _values: ~typing.Iterable | None = None, _func: ~collections.abc.Callable | None = None

then_by() (cpl_query.base.ordered_queryable_abc.OrderedQueryableABC method)

QueryableABC.average(_func: ~typing.Callable | None = None) -> int | float | complex

QueryableABC.count(_func: ~typing.Callable | None = None) -> int

QueryableABC.distinct(_func: ~typing.Callable | None = None) -> ~cpl_query.base.queryable_abc.QueryableABC

element_at_or_default() (cpl_query.base.queryable_abc.QueryableABC method)

first_or_default() (cpl_query.base.queryable_abc.QueryableABC method)

QueryableABC.group_by(_func: ~typing.Callable | None = None) -> ~cpl_query.base.queryable_abc.QueryableABC

last_or_default() (cpl_query.base.queryable_abc.QueryableABC method)

QueryableABC.max(_func: ~typing.Callable | None = None) -> object

QueryableABC.min(_func: ~typing.Callable | None = None) -> object

QueryableABC.order_by(_func: Callable = None) -> OrderedQueryableABC

order_by_descending() (cpl_query.base.queryable_abc.QueryableABC method)

QueryableABC.order_by_descending(_func: Callable = None) -> OrderedQueryableABC

QueryableABC.reverse() -> ~cpl_query.base.queryable_abc.QueryableABC

QueryableABC.select(_func: ~typing.Callable) -> ~cpl_query.base.queryable_abc.QueryableABC

select_many() (cpl_query.base.queryable_abc.QueryableABC method)

QueryableABC.select_many(_func: ~typing.Callable) -> ~cpl_query.base.queryable_abc.QueryableABC

ArgumentNoneException: when argument is None
Exception: when argument is None or found more than one element

single_or_default() (cpl_query.base.queryable_abc.QueryableABC method)

QueryableABC.skip(_index: int) -> ~cpl_query.base.queryable_abc.QueryableABC

QueryableABC.skip_last(_index: int) -> ~cpl_query.base.queryable_abc.QueryableABC

QueryableABC.split(_func: ~typing.Callable) -> ~cpl_query.base.queryable_abc.QueryableABC

QueryableABC.sum(_func: ~typing.Callable | None = None) -> int | float | complex

QueryableABC.take(_index: int) -> ~cpl_query.base.queryable_abc.QueryableABC

QueryableABC.take_last(_index: int) -> ~cpl_query.base.queryable_abc.QueryableABC

QueryableABC.where(_func: ~typing.Callable | None = None) -> ~cpl_query.base.queryable_abc.QueryableABC

Sequence.range(start: int, length: int) -> ~cpl_query.base.sequence.Sequence

Converts :class: `cpl_query.base.sequence_abc.SequenceABC` to :class: `list`

Implementation of :class: `cpl_query.enumerable.enumerable_abc.EnumerableABC`

EnumerableABC(t: type | None = None, values: list | None = None)

to_iterable() (cpl_query.enumerable.enumerable_abc.EnumerableABC method)

Converts :class: `cpl_query.enumerable.enumerable_abc.EnumerableABC` to :class: `cpl_query.iterable.iterable_abc.IterableABC`

List(t: type | None = None, values: ~typing.Iterator | None = None)

Implementation of :class: `cpl_query.extension.iterable.Iterable`

Converts :class: `cpl_query.iterable.iterable_abc.IterableABC` to :class: `cpl_query.enumerable.enumerable_abc.EnumerableABC`

Returns:
:class: `cpl_query.enumerable.enumerable_abc.EnumerableABC`

Iterable(t: type | None = None, values: ~typing.Iterable | None = None)

IterableABC(t: type | None = None, values: ~typing.Iterable | None = None)

IterableABC.extend(_IterableABC__iterable: ~typing.Iterable) -> ~cpl_query.iterable.iterable_abc.IterableABC

__iterable: :class: `cpl_query.extension.iterable.Iterable`
    index

index

remove_at() (cpl_query.iterable.iterable_abc.IterableABC method)

to_enumerable() (cpl_query.iterable.iterable_abc.IterableABC method)

transform() (cpl_translation.translate_pipe.TranslatePipe method)

TranslationService (class in cpl_translation.translation_service)

load() (cpl_translation.translation_service.TranslationService method)

set_lang() (cpl_translation.translation_service.TranslationService method)

translate() (cpl_translation.translation_service.TranslationService method)

TranslationServiceABC (class in cpl_translation.translation_service_abc)

load() (cpl_translation.translation_service_abc.TranslationServiceABC method)

TranslationSettings (class in cpl_translation.translation_settings)

TranslationSettings(languages: list | None = None, default_lang: str | None = None)

languages (cpl_translation.translation_settings.TranslationSettings property)

We now process the configuration models directly in the configuration by recursive parameter parsing.

The JSONProcessor now goes through the JSON and the arguments of the __init__ and links the attributes by name from the
JSON and the name of the keyword argument.
Now, based on the type, either simply assigns the value. With a ``dict`` the processor is called recursively and so the
JSON is processed further. This way nested ConfigurationModels can be processed.

The JSONProcessor now goes through the JSON and the arguments of the 

Now, based on the type, either simply assigns the value. With a 

class VersionSettings(ConfigurationModelABC):

    def __init__(self):
        ConfigurationModelABC.__init__(self)

        self.major: Optional[str] = "0"
        self.minor: Optional[str] = "0"
        self.micro: Optional[str] = "0"

    def from_dict(self, settings: dict):
        self.major = settings["Major"]
        self.minor = settings["Minor"]
        micro = settings["Micro"]
        if micro != '':
            self.micro = micro

    def __init__(self, major: str = None, minor: str = None, micro: str = None):

        self.major: Optional[str] = major
        self.minor: Optional[str] = minor
        self.micro: Optional[str] = micro if micro != "" else None

Only simple types can be processed
<br>
Wrong: ```dict[str, str]```
<br>
Correct: ```dict```
<br>
<br>
Incorrect: ```list[str]```
<br>
Correct: ```list```

The arguments must be optional, i.e. created as kwargs
<br>
Incorrect: ```def __init__(self, x: int, y: int)```
<br>
Correct: ```def __init__(self, x: int = None, y: int = None)```

Common Python Library documentation master file, created by
sphinx-quickstart on Wed Apr 14 10:25:36 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

The Common Python Library (CPL) is a package for python and a development platform meant to help you create simple and efficient server and desktop applications.

This CPL docs help you learn, understand and use the package. From your first application to complex apps for enterprises.

cpl-core
 - Expandable
 - Application base
     - Standardized application classes
     - Application object builder
     - Application extension classes
     - Startup classes
     - Startup extension classes
 - Configuration
     - Configure via object mapped JSON
     - Console argument handling
 - Console class for in and output
     - Banner
     - Spinner
     - Options (menu)
     - Table
     - Write
     - Write_at
     - Write_line
     - Write_line_at
 - Dependency injection
     - Service lifetimes: singleton, scoped and transient
 - Providing of application environment
     - Environment (development, staging, testing, production)
     - Appname
     - Customer
     - Hostname
     - Runtime directory
     - Working directory
 - Logging
     - Standardized logger
     - Log-level (FATAL, ERROR, WARN, INFO, DEBUG & TRACE)
 - Mail handling
     - Send mails
 - Pipe classes
     - Convert input
 - Utils
     - Credential manager
         - Encryption via BASE64
     - PIP wrapper class based on subprocess
         - Run pip commands
     - String converter to different variants
         - to_lower_case
         - to_camel_case
         - ...

cpl-core
- Expandable
- Application base
    - Standardized application classes
    - Application object builder
    - Application extension classes
    - Startup classes
    - Startup extension classes
- Configuration
    - Configure via object mapped JSON
    - Console argument handling
- Console class for in and output
    - Banner
    - Spinner
    - Options (menu)
    - Table
    - Write
    - Write_at
    - Write_line
    - Write_line_at
- Dependency injection
    - Service lifetimes: singleton, scoped and transient
- Providing of application environment
    - Environment (development, staging, testing, production)
    - Appname
    - Customer
    - Hostname
    - Runtime directory
    - Working directory
- Logging
    - Standardized logger
    - Log-level (FATAL, ERROR, WARN, INFO, DEBUG & TRACE)
- Mail handling
    - Send mails
- Pipe classes
    - Convert input
- Utils
    - Credential manager
        - Encryption via BASE64
    - PIP wrapper class based on subprocess
        - Run pip commands
    - String converter to different variants
        - to_lower_case
        - to_camel_case
        - ...

Application base
  - Standardized application classes
  - Application object builder
  - Application extension classes
  - Startup classes
  - Startup extension classes

- Standardized application classes
- Application object builder
- Application extension classes
- Startup classes
- Startup extension classes

Configuration
  - Configure via object mapped JSON
  - Console argument handling

- Configure via object mapped JSON
- Console argument handling

Console class for in and output
  - Banner
  - Spinner
  - Options (menu)
  - Table
  - Write
  - Write_at
  - Write_line
  - Write_line_at

- Banner
- Spinner
- Options (menu)
- Table
- Write
- Write_at
- Write_line
- Write_line_at

Dependency injection
  - Service lifetimes: singleton, scoped and transient

- Service lifetimes: singleton, scoped and transient

Providing of application environment
  - Environment (development, staging, testing, production)
  - Appname
  - Customer
  - Hostname
  - Runtime directory
  - Working directory

- Environment (development, staging, testing, production)
- Appname
- Customer
- Hostname
- Runtime directory
- Working directory

Logging
  - Standardized logger
  - Log-level (FATAL, ERROR, WARN, INFO, DEBUG & TRACE)

Logging
- Standardized logger
- Log-level (FATAL, ERROR, WARN, INFO, DEBUG & TRACE)

Utils
  - Credential manager
      - Encryption via BASE64
  - PIP wrapper class based on subprocess
      - Run pip commands
  - String converter to different variants
      - to_lower_case
      - to_camel_case
      - ...

Utils
- Credential manager
    - Encryption via BASE64
- PIP wrapper class based on subprocess
    - Run pip commands
- String converter to different variants
    - to_lower_case
    - to_camel_case
    - ...

String converter to different variants
  - to_lower_case
  - to_camel_case
  - ...

- to_lower_case
- to_camel_case
- ...

cpl-cli
 - Expandle
 - Code generation
 - Package managing
 - Build & Publishing

cpl-cli
- Expandle
- Code generation
- Package managing
- Build & Publishing

cpl-discord
 - Utils for discord.py
 - Connector between cpl-core and discord.py
 - Prepared services for dependency injection

- Utils for discord.py
- Connector between cpl-core and discord.py
- Prepared services for dependency injection

cpl-query
 - Python list extensions
 - Functions for sorting and filtering
 - Like linq from C# but in python xD

cpl-query
- Python list extensions
- Functions for sorting and filtering
- Like linq from C# but in python xD

cpl-translate
 - Generic translations
 - Prepared translation service and translate pipe
 - Get translation from JSON files key dot.key notation

- Generic translations
- Prepared translation service and translate pipe
- Get translation from JSON files key dot.key notation

These pages go into great detail about everything the Library can do.

Unexpected possible title overline or transition.
Treating it as ordinary text because it's so short.

Treating it as ordinary text because it’s so short.

This tutorial introduces you to the essentials of the CPL package by walking through building an console based app.

To get most out of this tutorial you should already have a basic understanding of the following.

Do you want to use application base? (y/n) n

Do you want to use service providing? (y/n) n

Creating sample-project/LICENSE                                                                     done
Creating sample-project/README.md                                                                   done
Creating sample-project/src/tests/__init__.py                                                       done
Creating sample-project/appsettings.json                                                            done
Creating sample-project/src/sample-project/__init__.py                                              done
Creating sample-project/src/sample-projectmain.py                                                   done

In PyCharm you have to enable ```Emulate terminal in output console```!

from cpl_core.console import Console

def main():
    Console.write_line('Password generator:')
    options = [
        'Only lower case',
        'Only upper case',
        'Lower and upper case'
        'Exit'
    ]
    option = Console.select('>', 'Select option: ', options)

if __name__ == '__main__':
    main()

def generate_password(letters: str, length: int) -> str:
    return ''.join(random.choice(letters) for i in range(length))

index = options.index(option)
letters = ''

if index == 0:
    letters = string.ascii_lowercase
elif index == 1:
    letters = string.ascii_uppercase
elif index == 2:
    letters = string.ascii_letters
elif index == len(options) - 1:
    exit()

Console.write_line('Password: ', generate_password(letters, length))

import random
import string

    options = [
        'Lower and upper case',
        'Exit'
    ]

    length = int(Console.read('Length: '))

    index = options.index(option)
    letters = ''
    if index == 0:
        letters = string.ascii_lowercase
    elif index == 1:
        letters = string.ascii_uppercase
    elif index == 2:
        letters = string.ascii_letters
    elif index == len(options) - 1:
        exit()

    Console.write_line('Password: ', generate_password(letters, length))

    main()

In this section, you've created an application that uses user input to generate a password.

In this section, you’ve created an application that uses user input to generate a password.

To install the package, open a terminal window and run the following command:

pip install cpl-core --extra-index-url https://pip.sh-edraft.de

You use the CPL CLI to create projects, generate application and library code. You also use the CLI to build and publish your python packages.

To install the CLI, open a terminal window and run the following command:

pip install cpl-query --extra-index-url https://pip.sh-edraft.de

You develop apps and packages in the context of an CPL project which is defined in an cpl_core.json.

Run the CLI command ```cpl new console``` and provide the name my-app, as shown here:

The cpl new command prompts you for information about features to include in the initial app. Decline the defaults by enter 'n' and press the Enter key.

The cpl new command prompts you for information about features to include in the initial app. Decline the defaults by enter ‘n’ and press the Enter key.

The CLI create a new workspace and a simple 'Hello World' app, ready to run.

The CLI create a new workspace and a simple ‘Hello World’ app, ready to run.

Run the CLI command ```cpl new library``` and provide the name my-lib, as shown here:

The cpl new command prompts you for information about features to include in the initial library. Decline the defaults by enter 'n' and press the Enter key.

The cpl new command prompts you for information about features to include in the initial library. Decline the defaults by enter ‘n’ and press the Enter key.

The CLI create a new workspace and a simple 'Hello World' library with CLI, ready to run.

The CLI create a new workspace and a simple ‘Hello World’ library with CLI, ready to run.

The CLI includes a live development server, so that you can run your app locally.

To navigate to your project workspace, run the following command:

The ```cpl start``` command launches the server, watches your source files, and restarts the app as you make chnages to thoses source files.

 command launches the server, watches your source files, and restarts the app as you make chnages to thoses source files.

If your installation and setup was successful, you should see a output similar to the following:

To learn more about the CPL CLI, see the [CLI Overview](cpl_cli.overview)

Fore more informations about the Pyhton files generated by ```cpl new```, see [New Command](cpl_cli.new)

Create a file which begins with ```schematic_your_schematic.py```.
A schematic template is detected by starting with  ```schematic_``` and endswith ```.py```.

You should replace ```your_schematic``` with an appropriate name of your schematic. For example, we will choose ```Enum```.
Attention: It is important that you do not overwrite templates by creating a file or class with the same name.

 with an appropriate name of your schematic. For example, we will choose 

In the template create a class with the name of your schematic. For example:

from cpl_cli.abc.generate_schematic_abc import GenerateSchematicABC

class Enum(GenerateSchematicABC):

    def __init__(self, *args: str):
        GenerateSchematicABC.__init__(self, *args)

    def get_code(self) -> str:
        import textwrap
        code = textwrap.dedent("""\
        from enum import Enum
        
        class $Name(Enum):
        
            atr = 0
        """)
        return self.build_code_str(code, Name=self._class_name)

    @classmethod
    def register(cls):
        GenerateSchematicABC.register(
            cls,
            'enum',
            ['e', 'E']
        )

You can test it by calling ```cpl g --help``` your schematic should be listed as available.

The project templating is a little more complex and is therefore divided into several files.
First of all, for information, it is very important not to overwrite any existing files or classes!

Template structure explained by the example of the internal type ```console```:

Template structure explained by the example of the internal type 

- project_console.py
- project_file_license.py
- project_file_appsettings.py
- project_file.py
- project_file_readme.py
- project_file_code_main.py
- project_file_code_startup.py
- project_file_code_application.py

Here the template ```project_console.py``` defines how a console project has to look like when it is generated. Here is the code to illustrate this:

 defines how a console project has to look like when it is generated. Here is the code to illustrate this:

from cpl_cli.abc.project_type_abc import ProjectTypeABC
from cpl_cli.configuration import WorkspaceSettings
from cpl_core.utils import String

class Console(ProjectTypeABC):

    def __init__(
            self,
            base_path: str,
            project_name: str,
            workspace: WorkspaceSettings,
            use_application_api: bool,
            use_startup: bool,
            use_service_providing: bool,
            use_async: bool,
            project_file_data: dict,
    ):
        from project_file import ProjectFile
        from project_file_appsettings import ProjectFileAppsettings
        from project_file_code_application import ProjectFileApplication
        from project_file_code_main import ProjectFileMain
        from project_file_code_startup import ProjectFileStartup
        from project_file_readme import ProjectFileReadme
        from project_file_license import ProjectFileLicense
        from schematic_init import Init

        ProjectTypeABC.__init__(self, base_path, project_name, workspace, use_application_api, use_startup, use_service_providing, use_async, project_file_data)

        project_path = f'{base_path}{String.convert_to_snake_case(project_name.split("/")[-1])}/'

        self.add_template(ProjectFile(project_name.split('/')[-1], project_path, project_file_data))
        if workspace is None:
            self.add_template(ProjectFileLicense(''))
            self.add_template(ProjectFileReadme(''))
            self.add_template(Init('', 'init', f'{base_path}tests/'))

        self.add_template(Init('', 'init', project_path))
        self.add_template(ProjectFileAppsettings(project_path))

        if use_application_api:
            self.add_template(ProjectFileApplication(project_path, use_application_api, use_startup, use_service_providing, use_async))

        if use_startup:
            self.add_template(ProjectFileStartup(project_path, use_application_api, use_startup, use_service_providing, use_async))

        self.add_template(ProjectFileMain(project_name.split('/')[-1], project_path, use_application_api, use_startup, use_service_providing, use_async))

The class must be named exactly as the project type should be named. It is also checked on the initial letter of the class as alias.
Now create a class for normal files which inherits from ```FileTemplateABC``` and a class for code files which inherits from ```CodeFileTemplateABC```.

from cpl_cli.abc.code_file_template_abc import CodeFileTemplateABC

class ProjectFileStartup(CodeFileTemplateABC):

    def __init__(self, path: str, use_application_api: bool, use_startup: bool, use_service_providing: bool, use_async: bool):
        CodeFileTemplateABC.__init__(self, 'startup', path, '', use_application_api, use_startup, use_service_providing, use_async)

        return textwrap.dedent("""\
        from cpl_core.application import StartupABC
        from cpl_core.configuration import ConfigurationABC
        from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
        from cpl_core.environment import ApplicationEnvironment
        
        class Startup(StartupABC):
        
            def __init__(self):
                StartupABC.__init__(self)
        
            def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
                return configuration
        
            def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
                return services.build_service_provider()
        """)

import json

from cpl_cli.abc.file_template_abc import FileTemplateABC

class ProjectFile(FileTemplateABC):

    def __init__(self, name: str, path: str, code: dict):
        FileTemplateABC.__init__(self, '', path, '{}')
        self._name = f'{name}.json'
        self._code = code

        return json.dumps(self._code, indent=2)