diff --git a/docs/build/doctrees/cpl.configuration.doctree b/docs/build/doctrees/cpl.configuration.doctree index 412dbfb9..0afb489b 100644 Binary files a/docs/build/doctrees/cpl.configuration.doctree and b/docs/build/doctrees/cpl.configuration.doctree differ diff --git a/docs/build/doctrees/cpl.console.doctree b/docs/build/doctrees/cpl.console.doctree index 676c0a96..aab2c4d2 100644 Binary files a/docs/build/doctrees/cpl.console.doctree and b/docs/build/doctrees/cpl.console.doctree differ diff --git a/docs/build/doctrees/cpl.database.doctree b/docs/build/doctrees/cpl.database.doctree index 853bad45..451e1917 100644 Binary files a/docs/build/doctrees/cpl.database.doctree and b/docs/build/doctrees/cpl.database.doctree differ diff --git a/docs/build/doctrees/cpl.logging.doctree b/docs/build/doctrees/cpl.logging.doctree index 80002b8a..9776b4f5 100644 Binary files a/docs/build/doctrees/cpl.logging.doctree and b/docs/build/doctrees/cpl.logging.doctree differ diff --git a/docs/build/doctrees/cpl.mailing.doctree b/docs/build/doctrees/cpl.mailing.doctree index f416c838..aed500ec 100644 Binary files a/docs/build/doctrees/cpl.mailing.doctree and b/docs/build/doctrees/cpl.mailing.doctree differ diff --git a/docs/build/doctrees/cpl.time.doctree b/docs/build/doctrees/cpl.time.doctree index c11c9846..61a5e233 100644 Binary files a/docs/build/doctrees/cpl.time.doctree and b/docs/build/doctrees/cpl.time.doctree differ diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 4f3ac721..5602a7f4 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/html/cpl.configuration.html b/docs/build/html/cpl.configuration.html index 4235fba0..7e3f735f 100644 --- a/docs/build/html/cpl.configuration.html +++ b/docs/build/html/cpl.configuration.html @@ -187,8 +187,12 @@ add_configuration(key_type: Union[str, type], value: cpl.configuration.configuration_model_abc.ConfigurationModelABC)

Add configuration object

-

key_type: Union[str, type] -value: cpl.configuration.configuration_model_abc.ConfigurationModelABC

+
+
key_type: Union[str, type]

Type of the value

+
+
value: cpl.configuration.configuration_model_abc.ConfigurationModelABC

Object of the value

+
+
@@ -197,7 +201,10 @@ value: add_console_argument(argument: cpl.configuration.console_argument.ConsoleArgument)

Adds console argument to known console arguments

-

argument: cpl.console.console_argument.ConsoleArgument

+
+
argument: cpl.configuration.console_argument.ConsoleArgument

Specifies the console argument

+
+
@@ -218,7 +225,10 @@ value: add_environment_variables(prefix: str)

Reads the environment variables

-

prefix: str

+
+
prefix: str

Prefix of the variables

+
+
@@ -227,10 +237,16 @@ value: add_json_file(name: str, optional: Optional[bool] = None, output: bool = True, path: Optional[str] = None)

Reads and saves settings from given json file

-

name (str): Name of the file -optional: str -output: bool -path: str

+
+
name: str

Name of the file

+
+
optional: str

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

+
+
output: bool

Specifies whether an output should take place

+
+
path: str

Path in which the file should be stored

+
+
@@ -254,7 +270,10 @@ path: get_configuration(search_type: Union[str, Type[cpl.configuration.configuration_model_abc.ConfigurationModelABC]])Union[str, collections.abc.Callable[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

Returns value from configuration by given type

-

search_type: Union[str, Type[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

+
+
search_type: Union[str, Type[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

Type to search for

+
+

Object of Union[str, Callable[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

@@ -275,8 +294,12 @@ path: abstract add_configuration(key_type: Union[str, type], value: cpl.configuration.configuration_model_abc.ConfigurationModelABC)

Add configuration object

-

key_type: Union[str, type] -value: cpl.configuration.configuration_model_abc.ConfigurationModelABC

+
+
key_type: Union[str, type]

Type of the value

+
+
value: cpl.configuration.configuration_model_abc.ConfigurationModelABC

Object of the value

+
+
@@ -285,7 +308,10 @@ value: abstract add_console_argument(argument: cpl.configuration.console_argument.ConsoleArgument
)

Adds console argument to known console arguments

-

argument: cpl.console.console_argument.ConsoleArgument

+
+
argument: cpl.configuration.console_argument.ConsoleArgument

Specifies the console argument

+
+
@@ -306,7 +332,10 @@ value: abstract add_environment_variables(prefix: str)

Reads the environment variables

-

prefix: str

+
+
prefix: str

Prefix of the variables

+
+
@@ -315,10 +344,16 @@ value: abstract add_json_file(name: str, optional: Optional[bool] = None, output: bool = True, path: Optional[str] = None)

Reads and saves settings from given json file

-

name (str): Name of the file -optional: str -output: bool -path: str

+
+
name: str

Name of the file

+
+
optional: str

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

+
+
output: bool

Specifies whether an output should take place

+
+
path: str

Path in which the file should be stored

+
+
@@ -342,7 +377,10 @@ path: abstract get_configuration(search_type: Union[str, Type[cpl.configuration.configuration_model_abc.ConfigurationModelABC]])Union[str, collections.abc.Callable[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

Returns value from configuration by given type

-

search_type: Union[str, Type[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

+
+
search_type: Union[str, Type[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

Type to search for

+
+

Object of Union[str, Callable[cpl.configuration.configuration_model_abc.ConfigurationModelABC]]

@@ -361,9 +399,10 @@ path:
abstract from_dict(settings: dict)
-

Converts attributes to dict -:param settings: -:return:

+

Converts attributes to dict

+
+

settings: dict

+
diff --git a/docs/build/html/cpl.console.html b/docs/build/html/cpl.console.html index 9b456b14..a5a47da4 100644 --- a/docs/build/html/cpl.console.html +++ b/docs/build/html/cpl.console.html @@ -246,53 +246,57 @@
classmethod banner(string: str)
-

Prints the string as a banner -:param string: -:return:

+

Prints the string as a banner

+
+
+
string: str

Message to print as banner

+
+
+
classmethod clear()
-

Clears the console -:return:

+

Clears the console

classmethod close()
-

Close the application -:return:

+

Closes the application

classmethod color_reset()
-

Resets color -:return:

+

Resets the color settings

classmethod disable()
-

Disable console interaction -:return:

+

Disables console interaction

classmethod enable()
-

Enable console interaction -:return:

+

Enables console interaction

classmethod error(string: str, tb: Optional[str] = None)
-

Prints an error with traceback -:param string: -:param tb: -:return:

+

Prints an error with traceback

+
+
+
string: str

Error message

+
+
tb: str

Error traceback

+
+
+
@@ -303,65 +307,106 @@
classmethod read(output: Optional[str] = None)str
-

Read in line -:param output: -:return:

+

Reads in line

+
+
+
output: str

String to print before input

+
+
+
+
+

input()

+
classmethod read_line(output: Optional[str] = None)str
-

Reads in next line -:param output: -:return:

+

Reads in next line

+
+
+
output: str

String to print before input

+
+
+
+
+

input()

+
classmethod reset_cursor_position()
-

Resets cursor position -:return:

+

Resets cursor position

classmethod select(char: str, message: str, options: list, header_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum] = <ForegroundColorEnum.default: 'default'>, header_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum] = <BackgroundColorEnum.default: 'on_default'>, option_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum] = <ForegroundColorEnum.default: 'default'>, option_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum] = <BackgroundColorEnum.default: 'on_default'>, cursor_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum] = <ForegroundColorEnum.default: 'default'>, cursor_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum] = <BackgroundColorEnum.default: 'on_default'>)str
-

Prints select menu -:param char: -:param message: -:param options: -:param header_foreground_color: -:param header_background_color: -:param option_foreground_color: -:param option_background_color: -:param cursor_foreground_color: -:param cursor_background_color: -:return: Selected option as str

+

Prints select menu

+
+
+
char: str

Character to show which element is selected

+
+
message: str

Message or header of the selection

+
+
options: List[str]

Selectable options

+
+
header_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum]

Foreground color of the header

+
+
header_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum]

Background color of the header

+
+
option_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum]

Foreground color of the options

+
+
option_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum]

Background color of the options

+
+
cursor_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum]

Foreground color of the cursor

+
+
cursor_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum]

Background color of the cursor

+
+
+
+
+

Selected option as str

+
classmethod set_background_color(color: Union[cpl.console.background_color_enum.BackgroundColorEnum, str])
-

Sets the background color -:param color: -:return:

+

Sets the background color

+
+
+
color: Union[cpl.console.background_color_enum.BackgroundColorEnum, str]

Background color of the console

+
+
+
classmethod set_cursor_position(x: int, y: int)
-

Sets cursor position -:param x: -:param y: -:return:

+

Sets cursor position

+
+
+
x: int

X coordinate

+
+
y: int

Y coordinate

+
+
+
classmethod set_foreground_color(color: Union[cpl.console.foreground_color_enum.ForegroundColorEnum, str])
-

Sets the foreground color -:param color: -:return:

+

Sets the foreground color

+
+
+
color: Union[cpl.console.background_color_enum.BackgroundColorEnum, str]

Foreground color of the console

+
+
+
@@ -372,63 +417,102 @@
classmethod spinner(message: str, call: collections.abc.Callable, *args, text_foreground_color: Optional[Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum]] = None, spinner_foreground_color: Optional[Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum]] = None, text_background_color: Optional[Union[str, cpl.console.background_color_enum.BackgroundColorEnum]] = None, spinner_background_color: Optional[Union[str, cpl.console.background_color_enum.BackgroundColorEnum]] = None, **kwargs)any
-

Shows spinner and calls given function -When function has ended the spinner stops -:param message: -:param call: -:param args: -:param text_foreground_color: -:param spinner_foreground_color: -:param text_background_color: -:param spinner_background_color: -:param kwargs: -:return: Return value of call

+

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

+
+
+
message: str

Message of the spinner

+
+
call: Callable

Function to call

+
+
args: list

Arguments of the function

+
+
text_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum]

Foreground color of the text

+
+
spinner_foreground_color: Union[str, cpl.console.foreground_color_enum.ForegroundColorEnum]

Foreground color of the spinner

+
+
text_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum]

Background color of the text

+
+
spinner_background_color: Union[str, cpl.console.background_color_enum.BackgroundColorEnum]

Background color of the spinner

+
+
kwargs: dict

Keyword arguments of the call

+
+
+
+
+

Return value of call

+
classmethod table(header: list, values: list)
-

Prints a table with header and values -:param header: -:param values: -:return:

+

Prints a table with header and values

+
+
+
header: List[str]

Header of the table

+
+
values: List[List[str]]

Values of the table

+
+
+
classmethod write(*args, end='')
-

Prints in active line -:param args: -:param end: -:return:

+

Prints in active line

+
+
+
args: list

Elements to print

+
+
end: str

Last character to print

+
+
+
classmethod write_at(x: int, y: int, *args)
-

Prints at given position -:param x: -:param y: -:param args: -:return:

+

Prints at given position

+
+
+
x: int

X coordinate

+
+
y: int

Y coordinate

+
+
args: list

Elements to print

+
+
+
classmethod write_line(*args)
-

Prints to new line -:param args: -:return:

+

Prints to new line

+
+
+
args: list

Elements to print

+
+
+
classmethod write_line_at(x: int, y: int, *args)
-

Prints new line at given position -:param x: -:param y: -:param args: -:return:

+

Prints new line at given position

+
+
+
x: int

X coordinate

+
+
y: int

Y coordinate

+
+
args: list

Elements to print

+
+
+
@@ -440,6 +524,15 @@ When function has ended the spinner stops
class cpl.console.console_call.ConsoleCall(function: collections.abc.Callable, *args)

Bases: object

+

Represents a console call, for hold back when spinner is active

+
+
+
function: Callable

Function to call

+
+
args: list

List of arguments

+
+
+
property args
@@ -514,25 +607,33 @@ When function has ended the spinner stops
class cpl.console.spinner_thread.SpinnerThread(msg_len: int, foreground_color: cpl.console.foreground_color_enum.ForegroundColorEnum, background_color: cpl.console.background_color_enum.BackgroundColorEnum)

Bases: threading.Thread

+

Thread to show spinner in terminal

+
+
+
msg_len: int

Length of the message

+
+
foreground_color: cpl.console.foreground_color.ForegroundColorEnum

Foreground color of the spinner

+
+
background_color: cpl.console.background_color.BackgroundColorEnum

Background color of the spinner

+
+
+
exit()
-

Stops the spinner -:return:

+

Stops the spinner

run()None
-

Entry point of thread, shows the spinner -:return:

+

Entry point of thread, shows the spinner

stop_spinning()
-

Stops the spinner -:return:

+

Stops the spinner

diff --git a/docs/build/html/cpl.database.html b/docs/build/html/cpl.database.html index ae07374e..413f183d 100644 --- a/docs/build/html/cpl.database.html +++ b/docs/build/html/cpl.database.html @@ -236,9 +236,10 @@
from_dict(settings: dict)
-

Converts attributes to dict -:param settings: -:return:

+

Converts attributes to dict

+
+

settings: dict

+
diff --git a/docs/build/html/cpl.logging.html b/docs/build/html/cpl.logging.html index 6c82e33d..d4ce2d63 100644 --- a/docs/build/html/cpl.logging.html +++ b/docs/build/html/cpl.logging.html @@ -393,9 +393,10 @@
from_dict(settings: dict)
-

Converts attributes to dict -:param settings: -:return:

+

Converts attributes to dict

+
+

settings: dict

+
diff --git a/docs/build/html/cpl.mailing.html b/docs/build/html/cpl.mailing.html index f5e20219..3e8ea1f2 100644 --- a/docs/build/html/cpl.mailing.html +++ b/docs/build/html/cpl.mailing.html @@ -328,9 +328,10 @@
from_dict(settings: dict)
-

Converts attributes to dict -:param settings: -:return:

+

Converts attributes to dict

+
+

settings: dict

+
diff --git a/docs/build/html/cpl.time.html b/docs/build/html/cpl.time.html index 2d20b516..3868dfcb 100644 --- a/docs/build/html/cpl.time.html +++ b/docs/build/html/cpl.time.html @@ -197,9 +197,10 @@
from_dict(settings: dict)
-

Converts attributes to dict -:param settings: -:return:

+

Converts attributes to dict

+
+

settings: dict

+
diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index 4a466f51..b017381e 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["cpl","cpl.application","cpl.configuration","cpl.console","cpl.database","cpl.database.connection","cpl.database.context","cpl.dependency_injection","cpl.environment","cpl.logging","cpl.mailing","cpl.time","cpl.utils","index","modules"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["cpl.rst","cpl.application.rst","cpl.configuration.rst","cpl.console.rst","cpl.database.rst","cpl.database.connection.rst","cpl.database.context.rst","cpl.dependency_injection.rst","cpl.environment.rst","cpl.logging.rst","cpl.mailing.rst","cpl.time.rst","cpl.utils.rst","index.rst","modules.rst"],objects:{"cpl.application":{application_abc:[1,0,0,"-"],application_builder:[1,0,0,"-"],application_builder_abc:[1,0,0,"-"],startup_abc:[1,0,0,"-"]},"cpl.application.application_abc":{ApplicationABC:[1,1,1,""]},"cpl.application.application_abc.ApplicationABC":{configure:[1,2,1,""],main:[1,2,1,""],run:[1,2,1,""]},"cpl.application.application_builder":{ApplicationBuilder:[1,1,1,""]},"cpl.application.application_builder.ApplicationBuilder":{build:[1,2,1,""],use_startup:[1,2,1,""]},"cpl.application.application_builder_abc":{ApplicationBuilderABC:[1,1,1,""]},"cpl.application.application_builder_abc.ApplicationBuilderABC":{build:[1,2,1,""],use_startup:[1,2,1,""]},"cpl.application.startup_abc":{StartupABC:[1,1,1,""]},"cpl.application.startup_abc.StartupABC":{configure_configuration:[1,2,1,""],configure_services:[1,2,1,""]},"cpl.configuration":{configuration:[2,0,0,"-"],configuration_abc:[2,0,0,"-"],configuration_model_abc:[2,0,0,"-"],configuration_variable_name_enum:[2,0,0,"-"],console_argument:[2,0,0,"-"]},"cpl.configuration.configuration":{Configuration:[2,1,1,""]},"cpl.configuration.configuration.Configuration":{add_configuration:[2,2,1,""],add_console_argument:[2,2,1,""],add_console_arguments:[2,2,1,""],add_environment_variables:[2,2,1,""],add_json_file:[2,2,1,""],additional_arguments:[2,2,1,""],argument_error_function:[2,2,1,""],environment:[2,2,1,""],get_configuration:[2,2,1,""]},"cpl.configuration.configuration_abc":{ConfigurationABC:[2,1,1,""]},"cpl.configuration.configuration_abc.ConfigurationABC":{add_configuration:[2,2,1,""],add_console_argument:[2,2,1,""],add_console_arguments:[2,2,1,""],add_environment_variables:[2,2,1,""],add_json_file:[2,2,1,""],additional_arguments:[2,2,1,""],argument_error_function:[2,2,1,""],environment:[2,2,1,""],get_configuration:[2,2,1,""]},"cpl.configuration.configuration_model_abc":{ConfigurationModelABC:[2,1,1,""]},"cpl.configuration.configuration_model_abc.ConfigurationModelABC":{from_dict:[2,2,1,""]},"cpl.configuration.configuration_variable_name_enum":{ConfigurationVariableNameEnum:[2,1,1,""]},"cpl.configuration.configuration_variable_name_enum.ConfigurationVariableNameEnum":{customer:[2,3,1,""],environment:[2,3,1,""],name:[2,3,1,""],to_list:[2,2,1,""]},"cpl.configuration.console_argument":{ConsoleArgument:[2,1,1,""]},"cpl.configuration.console_argument.ConsoleArgument":{aliases:[2,2,1,""],console_arguments:[2,2,1,""],is_value_token_optional:[2,2,1,""],name:[2,2,1,""],token:[2,2,1,""],value_token:[2,2,1,""]},"cpl.console":{background_color_enum:[3,0,0,"-"],console:[3,0,0,"-"],console_call:[3,0,0,"-"],foreground_color_enum:[3,0,0,"-"],spinner_thread:[3,0,0,"-"]},"cpl.console.background_color_enum":{BackgroundColorEnum:[3,1,1,""]},"cpl.console.background_color_enum.BackgroundColorEnum":{"default":[3,3,1,""],blue:[3,3,1,""],cyan:[3,3,1,""],green:[3,3,1,""],grey:[3,3,1,""],magenta:[3,3,1,""],red:[3,3,1,""],white:[3,3,1,""],yellow:[3,3,1,""]},"cpl.console.console":{Console:[3,1,1,""]},"cpl.console.console.Console":{background_color:[3,3,1,""],banner:[3,2,1,""],clear:[3,2,1,""],close:[3,2,1,""],color_reset:[3,2,1,""],disable:[3,2,1,""],enable:[3,2,1,""],error:[3,2,1,""],foreground_color:[3,3,1,""],read:[3,2,1,""],read_line:[3,2,1,""],reset_cursor_position:[3,2,1,""],select:[3,2,1,""],set_background_color:[3,2,1,""],set_cursor_position:[3,2,1,""],set_foreground_color:[3,2,1,""],set_hold_back:[3,2,1,""],spinner:[3,2,1,""],table:[3,2,1,""],write:[3,2,1,""],write_at:[3,2,1,""],write_line:[3,2,1,""],write_line_at:[3,2,1,""]},"cpl.console.console_call":{ConsoleCall:[3,1,1,""]},"cpl.console.console_call.ConsoleCall":{"function":[3,2,1,""],args:[3,2,1,""]},"cpl.console.foreground_color_enum":{ForegroundColorEnum:[3,1,1,""]},"cpl.console.foreground_color_enum.ForegroundColorEnum":{"default":[3,3,1,""],blue:[3,3,1,""],cyan:[3,3,1,""],green:[3,3,1,""],grey:[3,3,1,""],magenta:[3,3,1,""],red:[3,3,1,""],white:[3,3,1,""],yellow:[3,3,1,""]},"cpl.console.spinner_thread":{SpinnerThread:[3,1,1,""]},"cpl.console.spinner_thread.SpinnerThread":{exit:[3,2,1,""],run:[3,2,1,""],stop_spinning:[3,2,1,""]},"cpl.database":{database_model:[4,0,0,"-"],database_settings:[4,0,0,"-"],database_settings_name_enum:[4,0,0,"-"]},"cpl.database.connection":{database_connection:[5,0,0,"-"],database_connection_abc:[5,0,0,"-"]},"cpl.database.connection.database_connection":{DatabaseConnection:[5,1,1,""]},"cpl.database.connection.database_connection.DatabaseConnection":{connect:[5,2,1,""],engine:[5,2,1,""],session:[5,2,1,""]},"cpl.database.connection.database_connection_abc":{DatabaseConnectionABC:[5,1,1,""]},"cpl.database.connection.database_connection_abc.DatabaseConnectionABC":{connect:[5,2,1,""],engine:[5,2,1,""],session:[5,2,1,""]},"cpl.database.context":{database_context:[6,0,0,"-"],database_context_abc:[6,0,0,"-"]},"cpl.database.context.database_context":{DatabaseContext:[6,1,1,""]},"cpl.database.context.database_context.DatabaseContext":{connect:[6,2,1,""],engine:[6,2,1,""],save_changes:[6,2,1,""],session:[6,2,1,""]},"cpl.database.context.database_context_abc":{DatabaseContextABC:[6,1,1,""]},"cpl.database.context.database_context_abc.DatabaseContextABC":{connect:[6,2,1,""],engine:[6,2,1,""],save_changes:[6,2,1,""],session:[6,2,1,""]},"cpl.database.database_settings":{DatabaseSettings:[4,1,1,""]},"cpl.database.database_settings.DatabaseSettings":{auth_plugin:[4,2,1,""],case_sensitive:[4,2,1,""],connection_string:[4,2,1,""],credentials:[4,2,1,""],echo:[4,2,1,""],encoding:[4,2,1,""],from_dict:[4,2,1,""]},"cpl.database.database_settings_name_enum":{DatabaseSettingsNameEnum:[4,1,1,""]},"cpl.database.database_settings_name_enum.DatabaseSettingsNameEnum":{auth_plugin:[4,3,1,""],case_sensitive:[4,3,1,""],connection_string:[4,3,1,""],credentials:[4,3,1,""],echo:[4,3,1,""],encoding:[4,3,1,""]},"cpl.dependency_injection":{service_collection:[7,0,0,"-"],service_collection_abc:[7,0,0,"-"],service_descriptor:[7,0,0,"-"],service_lifetime_enum:[7,0,0,"-"],service_provider:[7,0,0,"-"],service_provider_abc:[7,0,0,"-"]},"cpl.dependency_injection.service_collection":{ServiceCollection:[7,1,1,""]},"cpl.dependency_injection.service_collection.ServiceCollection":{add_db_context:[7,2,1,""],add_logging:[7,2,1,""],add_scoped:[7,2,1,""],add_singleton:[7,2,1,""],add_transient:[7,2,1,""],build_service_provider:[7,2,1,""]},"cpl.dependency_injection.service_collection_abc":{ServiceCollectionABC:[7,1,1,""]},"cpl.dependency_injection.service_collection_abc.ServiceCollectionABC":{add_db_context:[7,2,1,""],add_logging:[7,2,1,""],add_scoped:[7,2,1,""],add_singleton:[7,2,1,""],add_transient:[7,2,1,""],build_service_provider:[7,2,1,""]},"cpl.dependency_injection.service_descriptor":{ServiceDescriptor:[7,1,1,""]},"cpl.dependency_injection.service_descriptor.ServiceDescriptor":{implementation:[7,2,1,""],lifetime:[7,2,1,""],service_type:[7,2,1,""]},"cpl.dependency_injection.service_lifetime_enum":{ServiceLifetimeEnum:[7,1,1,""]},"cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum":{"transient":[7,3,1,""],scoped:[7,3,1,""],singleton:[7,3,1,""]},"cpl.dependency_injection.service_provider":{ServiceProvider:[7,1,1,""]},"cpl.dependency_injection.service_provider.ServiceProvider":{build_service:[7,2,1,""],get_service:[7,2,1,""]},"cpl.dependency_injection.service_provider_abc":{ServiceProviderABC:[7,1,1,""]},"cpl.dependency_injection.service_provider_abc.ServiceProviderABC":{build_service:[7,2,1,""],get_service:[7,2,1,""]},"cpl.environment":{application_environment:[8,0,0,"-"],application_environment_abc:[8,0,0,"-"],environment_name_enum:[8,0,0,"-"]},"cpl.environment.application_environment":{ApplicationEnvironment:[8,1,1,""]},"cpl.environment.application_environment.ApplicationEnvironment":{application_name:[8,2,1,""],customer:[8,2,1,""],date_time_now:[8,2,1,""],end_time:[8,2,1,""],environment_name:[8,2,1,""],host_name:[8,2,1,""],runtime_directory:[8,2,1,""],set_runtime_directory:[8,2,1,""],set_working_directory:[8,2,1,""],start_time:[8,2,1,""],working_directory:[8,2,1,""]},"cpl.environment.application_environment_abc":{ApplicationEnvironmentABC:[8,1,1,""]},"cpl.environment.application_environment_abc.ApplicationEnvironmentABC":{application_name:[8,2,1,""],customer:[8,2,1,""],date_time_now:[8,2,1,""],end_time:[8,2,1,""],environment_name:[8,2,1,""],host_name:[8,2,1,""],runtime_directory:[8,2,1,""],set_runtime_directory:[8,2,1,""],set_working_directory:[8,2,1,""],start_time:[8,2,1,""],working_directory:[8,2,1,""]},"cpl.environment.environment_name_enum":{EnvironmentNameEnum:[8,1,1,""]},"cpl.environment.environment_name_enum.EnvironmentNameEnum":{development:[8,3,1,""],production:[8,3,1,""],staging:[8,3,1,""],testing:[8,3,1,""]},"cpl.logging":{logger_abc:[9,0,0,"-"],logger_service:[9,0,0,"-"],logging_level_enum:[9,0,0,"-"],logging_settings:[9,0,0,"-"],logging_settings_name_enum:[9,0,0,"-"]},"cpl.logging.logger_abc":{LoggerABC:[9,1,1,""]},"cpl.logging.logger_abc.LoggerABC":{debug:[9,2,1,""],error:[9,2,1,""],fatal:[9,2,1,""],header:[9,2,1,""],info:[9,2,1,""],trace:[9,2,1,""],warn:[9,2,1,""]},"cpl.logging.logger_service":{Logger:[9,1,1,""]},"cpl.logging.logger_service.Logger":{create:[9,2,1,""],debug:[9,2,1,""],error:[9,2,1,""],fatal:[9,2,1,""],header:[9,2,1,""],info:[9,2,1,""],trace:[9,2,1,""],warn:[9,2,1,""]},"cpl.logging.logging_level_enum":{LoggingLevelEnum:[9,1,1,""]},"cpl.logging.logging_level_enum.LoggingLevelEnum":{DEBUG:[9,3,1,""],ERROR:[9,3,1,""],FATAL:[9,3,1,""],INFO:[9,3,1,""],OFF:[9,3,1,""],TRACE:[9,3,1,""],WARN:[9,3,1,""]},"cpl.logging.logging_settings":{LoggingSettings:[9,1,1,""]},"cpl.logging.logging_settings.LoggingSettings":{console:[9,2,1,""],filename:[9,2,1,""],from_dict:[9,2,1,""],level:[9,2,1,""],path:[9,2,1,""]},"cpl.logging.logging_settings_name_enum":{LoggingSettingsNameEnum:[9,1,1,""]},"cpl.logging.logging_settings_name_enum.LoggingSettingsNameEnum":{console_level:[9,3,1,""],file_level:[9,3,1,""],filename:[9,3,1,""],path:[9,3,1,""]},"cpl.mailing":{email:[10,0,0,"-"],email_client_abc:[10,0,0,"-"],email_client_service:[10,0,0,"-"],email_client_settings:[10,0,0,"-"],email_client_settings_name_enum:[10,0,0,"-"]},"cpl.mailing.email":{EMail:[10,1,1,""]},"cpl.mailing.email.EMail":{add_header:[10,2,1,""],add_receiver:[10,2,1,""],body:[10,2,1,""],check_mail:[10,2,1,""],get_content:[10,2,1,""],header:[10,2,1,""],header_list:[10,2,1,""],receiver:[10,2,1,""],receiver_list:[10,2,1,""],subject:[10,2,1,""],transceiver:[10,2,1,""]},"cpl.mailing.email_client_abc":{EMailClientABC:[10,1,1,""]},"cpl.mailing.email_client_abc.EMailClientABC":{connect:[10,2,1,""],send_mail:[10,2,1,""]},"cpl.mailing.email_client_service":{EMailClient:[10,1,1,""]},"cpl.mailing.email_client_service.EMailClient":{connect:[10,2,1,""],create:[10,2,1,""],login:[10,2,1,""],send_mail:[10,2,1,""]},"cpl.mailing.email_client_settings":{EMailClientSettings:[10,1,1,""]},"cpl.mailing.email_client_settings.EMailClientSettings":{credentials:[10,2,1,""],from_dict:[10,2,1,""],host:[10,2,1,""],port:[10,2,1,""],user_name:[10,2,1,""]},"cpl.mailing.email_client_settings_name_enum":{EMailClientSettingsNameEnum:[10,1,1,""]},"cpl.mailing.email_client_settings_name_enum.EMailClientSettingsNameEnum":{credentials:[10,3,1,""],host:[10,3,1,""],port:[10,3,1,""],user_name:[10,3,1,""]},"cpl.time":{time_format_settings:[11,0,0,"-"],time_format_settings_names_enum:[11,0,0,"-"]},"cpl.time.time_format_settings":{TimeFormatSettings:[11,1,1,""]},"cpl.time.time_format_settings.TimeFormatSettings":{date_format:[11,2,1,""],date_time_format:[11,2,1,""],date_time_log_format:[11,2,1,""],from_dict:[11,2,1,""],time_format:[11,2,1,""]},"cpl.time.time_format_settings_names_enum":{TimeFormatSettingsNamesEnum:[11,1,1,""]},"cpl.time.time_format_settings_names_enum.TimeFormatSettingsNamesEnum":{date_format:[11,3,1,""],date_time_format:[11,3,1,""],date_time_log_format:[11,3,1,""],time_format:[11,3,1,""]},"cpl.utils":{credential_manager:[12,0,0,"-"],pip:[12,0,0,"-"],string:[12,0,0,"-"]},"cpl.utils.credential_manager":{CredentialManager:[12,1,1,""]},"cpl.utils.credential_manager.CredentialManager":{build_string:[12,2,1,""],decrypt:[12,2,1,""],encrypt:[12,2,1,""]},"cpl.utils.pip":{Pip:[12,1,1,""]},"cpl.utils.pip.Pip":{get_executable:[12,2,1,""],get_outdated:[12,2,1,""],get_package:[12,2,1,""],install:[12,2,1,""],reset_executable:[12,2,1,""],set_executable:[12,2,1,""],uninstall:[12,2,1,""]},"cpl.utils.string":{String:[12,1,1,""]},"cpl.utils.string.String":{convert_to_camel_case:[12,2,1,""],convert_to_snake_case:[12,2,1,""],first_to_lower:[12,2,1,""],first_to_upper:[12,2,1,""],random_string:[12,2,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute"},terms:{"abstract":[1,2,5,6,7,8,9,10],"byte":12,"case":12,"char":[3,12],"class":[1,2,3,4,5,6,7,8,9,10,11,12],"default":3,"enum":[2,3,4,7,8,9,10,11],"function":[3,12],"int":[3,12],"new":3,"return":[2,3,4,5,6,7,8,9,10,11,12],"static":[2,10,12],"transient":7,"true":2,The:13,These:13,Useful:[3,12],abc:[1,2,3,5,6,7,8,9,10],about:13,activ:3,add:[2,7,10],add_configur:2,add_console_argu:2,add_db_context:7,add_environment_vari:2,add_head:10,add_json_fil:2,add_log:7,add_receiv:10,add_scop:7,add_singleton:7,add_transi:7,additional_argu:2,address:10,alias:2,ani:3,app:[1,13],applic:[0,3,13,14],application_abc:[0,14],application_build:[0,14],application_builder_abc:[0,14],application_environ:[0,14],application_environment_abc:[0,9,10,14],application_nam:8,applicationabc:1,applicationbuild:1,applicationbuilderabc:1,applicationenviron:8,applicationenvironmentabc:[8,9,10],appset:1,arg:[1,3,6,12],argument:2,argument_error_funct:2,attribut:[2,4,9,10,11],auth_plugin:4,authplugin:4,background:3,background_color:3,background_color_enum:[0,14],backgroundcolorenum:3,banner:3,base64:12,base:[1,2,3,4,5,6,7,8,9,10,11,12],blue:3,bodi:10,bool:[2,3,10],build:[1,12],build_servic:7,build_service_provid:7,build_str:12,call:[1,3],callabl:[2,3,7],camel:12,can:13,case_sensit:4,casesensit:4,chang:6,check:10,check_mail:10,classmethod:[3,12],clear:3,close:3,collect:[2,3,7],color:3,color_reset:3,command:12,common:13,complex:13,config:[1,7],configur:[0,1,4,7,9,10,11,14],configuration_abc:[0,1,7,14],configuration_model_abc:[0,4,9,10,11,14],configuration_variable_name_enum:[0,14],configurationabc:[1,2,7],configurationmodelabc:[2,4,9,10,11],configurationvariablenameenum:2,configure_configur:1,configure_servic:1,connect:[0,4,6,10,14],connection_str:[4,5,6],connectionstr:4,consol:[0,2,9,14],console_argu:[0,14],console_cal:[0,14],console_level:9,consoleargu:2,consolecal:3,consoleloglevel:9,contain:1,context:[0,4,7,14],convert:[2,4,9,10,11,12],convert_to_camel_cas:12,convert_to_snake_cas:12,creat:[1,7,9,10,12,13],credenti:[4,10,12],credential_manag:[0,14],credentialmanag:12,current:8,cursor:3,cursor_background_color:3,cursor_foreground_color:3,custom:[1,2,8],cyan:3,databas:[0,7,14],database_connect:[0,4,14],database_connection_abc:[0,4,14],database_context:[0,4,14],database_context_abc:[0,4,7,14],database_model:[0,14],database_set:[0,5,6,7,14],database_settings_name_enum:[0,14],databaseconnect:5,databaseconnectionabc:5,databasecontext:6,databasecontextabc:[6,7],databaseset:[4,5,6,7],databasesettingsnameenum:4,date_format:11,date_time_format:11,date_time_log_format:11,date_time_now:8,dateformat:11,datetimeformat:11,datetimelogformat:11,db_context:7,db_context_typ:7,db_set:7,debug:9,decod:12,decrypt:12,defin:2,dependency_inject:[0,1,14],desktop:13,detail:13,develop:[8,13],dict:[2,4,9,10,11],directori:8,disabl:3,echo:4,effici:13,email:[0,14],email_client_abc:[0,14],email_client_servic:[0,14],email_client_set:[0,14],email_client_settings_name_enum:[0,14],emailcli:10,emailclientabc:10,emailclientset:10,emailclientsettingsnameenum:10,enabl:3,encod:[4,12],encrypt:12,end:3,end_tim:8,engin:[5,6],enterpris:13,entri:[1,3],enumer:[2,3,4,7,8,9,10,11],env:9,environ:[0,2,9,10,14],environment_nam:8,environment_name_enum:[0,14],environmentnameenum:8,error:[2,3,9],everyth:13,except:9,execut:12,exit:[3,9],fatal:9,file:2,file_level:9,fileloglevel:9,filenam:9,first:[12,13],first_to_low:12,first_to_upp:12,foreground:3,foreground_color:3,foreground_color_enum:[0,14],foregroundcolorenum:3,from:[1,2,13],from_dict:[2,4,9,10,11],get:12,get_configur:2,get_cont:10,get_execut:12,get_outd:12,get_packag:12,get_servic:7,given:[2,3,7,12],great:13,green:3,grei:3,handl:[3,12],has:3,header:[3,9,10],header_background_color:3,header_foreground_color:3,header_list:10,help:13,host:10,host_nam:8,implement:7,info:9,inform:9,input:3,instal:12,instanc:[1,7],instance_typ:7,interact:3,intern:7,invalid:2,is_value_token_opt:2,json:2,key_typ:2,known:2,kwarg:3,learn:13,length:12,level:9,librari:13,lifetim:7,line:3,list:[2,3,7,10,12],load:1,local:12,log:[0,10,14],logfil:9,logger:[7,9,10],logger_abc:[0,10,14],logger_servic:[0,14],loggerabc:[9,10],logging_level_enum:[0,14],logging_set:[0,14],logging_settings_name_enum:[0,14],logginglevelenum:9,loggingset:9,loggingsettingsnameenum:9,login:10,lower:12,magenta:3,mail:[0,14],mail_set:10,main:1,meant:13,menu:3,messag:[3,9],msg_len:3,name:[2,8,9],next:3,none:[2,3,7,9,10,12],object:[1,2,3,7,10,12],off:9,on_blu:3,on_cyan:3,on_default:3,on_green:3,on_grei:3,on_magenta:3,on_r:3,on_whit:3,on_yellow:3,option:[2,3,7,9,10,12],option_background_color:3,option_foreground_color:3,outdat:12,output:[2,3],packag:[12,13],page:13,param:[2,3,4,5,6,7,8,9,10,11,12],path:[2,9],pip:[0,14],platform:13,point:[1,3],port:10,posit:3,prefix:2,prepar:1,print:3,product:8,properti:[2,3,4,5,6,7,8,9,10,11],provid:[1,7],python:13,random:12,random_str:12,read:[2,3],read_lin:3,receiv:10,receiver_list:10,red:3,reset:[3,12],reset_cursor_posit:3,reset_execut:12,run:[1,3],runtim:8,runtime_directori:8,save:[2,6],save_chang:6,scope:7,search_typ:2,select:3,send:10,send_mail:10,server:[10,13],servic:[1,7],service_collect:[0,14],service_collection_abc:[0,14],service_descriptor:[0,14],service_lifetime_enum:[0,14],service_provid:[0,14],service_provider_abc:[0,1,14],service_typ:7,servicecollect:7,servicecollectionabc:7,servicedescriptor:7,servicelifetimeenum:7,serviceprovid:7,serviceproviderabc:[1,7],session:[5,6],set:[1,2,3,4,8,9,10,11,12],set_background_color:3,set_cursor_posit:3,set_execut:12,set_foreground_color:3,set_hold_back:3,set_runtime_directori:8,set_working_directori:8,show:3,shown:2,simpl:13,singleton:7,snake:12,sourc:12,spinner:3,spinner_background_color:3,spinner_foreground_color:3,spinner_thread:[0,14],spinnerthread:3,stage:8,standard:12,start_tim:8,startup:1,startup_abc:[0,14],startupabc:1,stderr:12,stdout:12,stop:3,stop_spin:3,str:[2,3,5,6,8,9,10,12],string:[0,3,5,6,9,10,14],subject:10,submodul:[0,14],system:12,tabl:[3,12],test:8,text_background_color:3,text_foreground_color:3,thi:[1,13],thread:3,time:[0,9,14],time_format:[9,11],time_format_set:[0,9,14],time_format_settings_names_enum:[0,14],timeformat:11,timeformatset:[9,11],timeformatsettingsnamesenum:11,to_list:2,token:2,trace:9,traceback:3,transceiv:10,tree:9,type:[1,2,7],understand:13,uninstal:12,union:[2,3,7],upper:12,use:[1,13],use_startup:1,used:1,user_nam:10,usernam:10,util:[0,14],valid:10,valu:[2,3,4,7,8,9,10,11],value_token:2,variabl:2,warn:9,when:3,white:3,work:8,working_directori:8,write:[3,9],write_at:3,write_lin:3,write_line_at:3,yellow:3,you:13,your:13},titles:["CPL","cpl.application","cpl.configuration","cpl.console","cpl.database","cpl.database.connection","cpl.database.context","cpl.dependency_injection","cpl.environment","cpl.logging","cpl.mailing","cpl.time","cpl.utils","Introduction to the CPL Docs","cpl"],titleterms:{applic:1,application_abc:1,application_build:1,application_builder_abc:1,application_environ:8,application_environment_abc:8,background_color_enum:3,configur:2,configuration_abc:2,configuration_model_abc:2,configuration_variable_name_enum:2,connect:5,consol:3,console_argu:2,console_cal:3,context:6,cpl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],credential_manag:12,databas:[4,5,6],database_connect:5,database_connection_abc:5,database_context:6,database_context_abc:6,database_model:4,database_set:4,database_settings_name_enum:4,dependency_inject:7,doc:13,email:10,email_client_abc:10,email_client_servic:10,email_client_set:10,email_client_settings_name_enum:10,environ:8,environment_name_enum:8,foreground_color_enum:3,introduct:13,log:9,logger_abc:9,logger_servic:9,logging_level_enum:9,logging_set:9,logging_settings_name_enum:9,mail:10,manual:13,pip:12,service_collect:7,service_collection_abc:7,service_descriptor:7,service_lifetime_enum:7,service_provid:7,service_provider_abc:7,spinner_thread:3,startup_abc:1,string:12,submodul:4,time:11,time_format_set:11,time_format_settings_names_enum:11,util:12}}) \ No newline at end of file +Search.setIndex({docnames:["cpl","cpl.application","cpl.configuration","cpl.console","cpl.database","cpl.database.connection","cpl.database.context","cpl.dependency_injection","cpl.environment","cpl.logging","cpl.mailing","cpl.time","cpl.utils","index","modules"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["cpl.rst","cpl.application.rst","cpl.configuration.rst","cpl.console.rst","cpl.database.rst","cpl.database.connection.rst","cpl.database.context.rst","cpl.dependency_injection.rst","cpl.environment.rst","cpl.logging.rst","cpl.mailing.rst","cpl.time.rst","cpl.utils.rst","index.rst","modules.rst"],objects:{"cpl.application":{application_abc:[1,0,0,"-"],application_builder:[1,0,0,"-"],application_builder_abc:[1,0,0,"-"],startup_abc:[1,0,0,"-"]},"cpl.application.application_abc":{ApplicationABC:[1,1,1,""]},"cpl.application.application_abc.ApplicationABC":{configure:[1,2,1,""],main:[1,2,1,""],run:[1,2,1,""]},"cpl.application.application_builder":{ApplicationBuilder:[1,1,1,""]},"cpl.application.application_builder.ApplicationBuilder":{build:[1,2,1,""],use_startup:[1,2,1,""]},"cpl.application.application_builder_abc":{ApplicationBuilderABC:[1,1,1,""]},"cpl.application.application_builder_abc.ApplicationBuilderABC":{build:[1,2,1,""],use_startup:[1,2,1,""]},"cpl.application.startup_abc":{StartupABC:[1,1,1,""]},"cpl.application.startup_abc.StartupABC":{configure_configuration:[1,2,1,""],configure_services:[1,2,1,""]},"cpl.configuration":{configuration:[2,0,0,"-"],configuration_abc:[2,0,0,"-"],configuration_model_abc:[2,0,0,"-"],configuration_variable_name_enum:[2,0,0,"-"],console_argument:[2,0,0,"-"]},"cpl.configuration.configuration":{Configuration:[2,1,1,""]},"cpl.configuration.configuration.Configuration":{add_configuration:[2,2,1,""],add_console_argument:[2,2,1,""],add_console_arguments:[2,2,1,""],add_environment_variables:[2,2,1,""],add_json_file:[2,2,1,""],additional_arguments:[2,2,1,""],argument_error_function:[2,2,1,""],environment:[2,2,1,""],get_configuration:[2,2,1,""]},"cpl.configuration.configuration_abc":{ConfigurationABC:[2,1,1,""]},"cpl.configuration.configuration_abc.ConfigurationABC":{add_configuration:[2,2,1,""],add_console_argument:[2,2,1,""],add_console_arguments:[2,2,1,""],add_environment_variables:[2,2,1,""],add_json_file:[2,2,1,""],additional_arguments:[2,2,1,""],argument_error_function:[2,2,1,""],environment:[2,2,1,""],get_configuration:[2,2,1,""]},"cpl.configuration.configuration_model_abc":{ConfigurationModelABC:[2,1,1,""]},"cpl.configuration.configuration_model_abc.ConfigurationModelABC":{from_dict:[2,2,1,""]},"cpl.configuration.configuration_variable_name_enum":{ConfigurationVariableNameEnum:[2,1,1,""]},"cpl.configuration.configuration_variable_name_enum.ConfigurationVariableNameEnum":{customer:[2,3,1,""],environment:[2,3,1,""],name:[2,3,1,""],to_list:[2,2,1,""]},"cpl.configuration.console_argument":{ConsoleArgument:[2,1,1,""]},"cpl.configuration.console_argument.ConsoleArgument":{aliases:[2,2,1,""],console_arguments:[2,2,1,""],is_value_token_optional:[2,2,1,""],name:[2,2,1,""],token:[2,2,1,""],value_token:[2,2,1,""]},"cpl.console":{background_color_enum:[3,0,0,"-"],console:[3,0,0,"-"],console_call:[3,0,0,"-"],foreground_color_enum:[3,0,0,"-"],spinner_thread:[3,0,0,"-"]},"cpl.console.background_color_enum":{BackgroundColorEnum:[3,1,1,""]},"cpl.console.background_color_enum.BackgroundColorEnum":{"default":[3,3,1,""],blue:[3,3,1,""],cyan:[3,3,1,""],green:[3,3,1,""],grey:[3,3,1,""],magenta:[3,3,1,""],red:[3,3,1,""],white:[3,3,1,""],yellow:[3,3,1,""]},"cpl.console.console":{Console:[3,1,1,""]},"cpl.console.console.Console":{background_color:[3,3,1,""],banner:[3,2,1,""],clear:[3,2,1,""],close:[3,2,1,""],color_reset:[3,2,1,""],disable:[3,2,1,""],enable:[3,2,1,""],error:[3,2,1,""],foreground_color:[3,3,1,""],read:[3,2,1,""],read_line:[3,2,1,""],reset_cursor_position:[3,2,1,""],select:[3,2,1,""],set_background_color:[3,2,1,""],set_cursor_position:[3,2,1,""],set_foreground_color:[3,2,1,""],set_hold_back:[3,2,1,""],spinner:[3,2,1,""],table:[3,2,1,""],write:[3,2,1,""],write_at:[3,2,1,""],write_line:[3,2,1,""],write_line_at:[3,2,1,""]},"cpl.console.console_call":{ConsoleCall:[3,1,1,""]},"cpl.console.console_call.ConsoleCall":{"function":[3,2,1,""],args:[3,2,1,""]},"cpl.console.foreground_color_enum":{ForegroundColorEnum:[3,1,1,""]},"cpl.console.foreground_color_enum.ForegroundColorEnum":{"default":[3,3,1,""],blue:[3,3,1,""],cyan:[3,3,1,""],green:[3,3,1,""],grey:[3,3,1,""],magenta:[3,3,1,""],red:[3,3,1,""],white:[3,3,1,""],yellow:[3,3,1,""]},"cpl.console.spinner_thread":{SpinnerThread:[3,1,1,""]},"cpl.console.spinner_thread.SpinnerThread":{exit:[3,2,1,""],run:[3,2,1,""],stop_spinning:[3,2,1,""]},"cpl.database":{database_model:[4,0,0,"-"],database_settings:[4,0,0,"-"],database_settings_name_enum:[4,0,0,"-"]},"cpl.database.connection":{database_connection:[5,0,0,"-"],database_connection_abc:[5,0,0,"-"]},"cpl.database.connection.database_connection":{DatabaseConnection:[5,1,1,""]},"cpl.database.connection.database_connection.DatabaseConnection":{connect:[5,2,1,""],engine:[5,2,1,""],session:[5,2,1,""]},"cpl.database.connection.database_connection_abc":{DatabaseConnectionABC:[5,1,1,""]},"cpl.database.connection.database_connection_abc.DatabaseConnectionABC":{connect:[5,2,1,""],engine:[5,2,1,""],session:[5,2,1,""]},"cpl.database.context":{database_context:[6,0,0,"-"],database_context_abc:[6,0,0,"-"]},"cpl.database.context.database_context":{DatabaseContext:[6,1,1,""]},"cpl.database.context.database_context.DatabaseContext":{connect:[6,2,1,""],engine:[6,2,1,""],save_changes:[6,2,1,""],session:[6,2,1,""]},"cpl.database.context.database_context_abc":{DatabaseContextABC:[6,1,1,""]},"cpl.database.context.database_context_abc.DatabaseContextABC":{connect:[6,2,1,""],engine:[6,2,1,""],save_changes:[6,2,1,""],session:[6,2,1,""]},"cpl.database.database_settings":{DatabaseSettings:[4,1,1,""]},"cpl.database.database_settings.DatabaseSettings":{auth_plugin:[4,2,1,""],case_sensitive:[4,2,1,""],connection_string:[4,2,1,""],credentials:[4,2,1,""],echo:[4,2,1,""],encoding:[4,2,1,""],from_dict:[4,2,1,""]},"cpl.database.database_settings_name_enum":{DatabaseSettingsNameEnum:[4,1,1,""]},"cpl.database.database_settings_name_enum.DatabaseSettingsNameEnum":{auth_plugin:[4,3,1,""],case_sensitive:[4,3,1,""],connection_string:[4,3,1,""],credentials:[4,3,1,""],echo:[4,3,1,""],encoding:[4,3,1,""]},"cpl.dependency_injection":{service_collection:[7,0,0,"-"],service_collection_abc:[7,0,0,"-"],service_descriptor:[7,0,0,"-"],service_lifetime_enum:[7,0,0,"-"],service_provider:[7,0,0,"-"],service_provider_abc:[7,0,0,"-"]},"cpl.dependency_injection.service_collection":{ServiceCollection:[7,1,1,""]},"cpl.dependency_injection.service_collection.ServiceCollection":{add_db_context:[7,2,1,""],add_logging:[7,2,1,""],add_scoped:[7,2,1,""],add_singleton:[7,2,1,""],add_transient:[7,2,1,""],build_service_provider:[7,2,1,""]},"cpl.dependency_injection.service_collection_abc":{ServiceCollectionABC:[7,1,1,""]},"cpl.dependency_injection.service_collection_abc.ServiceCollectionABC":{add_db_context:[7,2,1,""],add_logging:[7,2,1,""],add_scoped:[7,2,1,""],add_singleton:[7,2,1,""],add_transient:[7,2,1,""],build_service_provider:[7,2,1,""]},"cpl.dependency_injection.service_descriptor":{ServiceDescriptor:[7,1,1,""]},"cpl.dependency_injection.service_descriptor.ServiceDescriptor":{implementation:[7,2,1,""],lifetime:[7,2,1,""],service_type:[7,2,1,""]},"cpl.dependency_injection.service_lifetime_enum":{ServiceLifetimeEnum:[7,1,1,""]},"cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum":{"transient":[7,3,1,""],scoped:[7,3,1,""],singleton:[7,3,1,""]},"cpl.dependency_injection.service_provider":{ServiceProvider:[7,1,1,""]},"cpl.dependency_injection.service_provider.ServiceProvider":{build_service:[7,2,1,""],get_service:[7,2,1,""]},"cpl.dependency_injection.service_provider_abc":{ServiceProviderABC:[7,1,1,""]},"cpl.dependency_injection.service_provider_abc.ServiceProviderABC":{build_service:[7,2,1,""],get_service:[7,2,1,""]},"cpl.environment":{application_environment:[8,0,0,"-"],application_environment_abc:[8,0,0,"-"],environment_name_enum:[8,0,0,"-"]},"cpl.environment.application_environment":{ApplicationEnvironment:[8,1,1,""]},"cpl.environment.application_environment.ApplicationEnvironment":{application_name:[8,2,1,""],customer:[8,2,1,""],date_time_now:[8,2,1,""],end_time:[8,2,1,""],environment_name:[8,2,1,""],host_name:[8,2,1,""],runtime_directory:[8,2,1,""],set_runtime_directory:[8,2,1,""],set_working_directory:[8,2,1,""],start_time:[8,2,1,""],working_directory:[8,2,1,""]},"cpl.environment.application_environment_abc":{ApplicationEnvironmentABC:[8,1,1,""]},"cpl.environment.application_environment_abc.ApplicationEnvironmentABC":{application_name:[8,2,1,""],customer:[8,2,1,""],date_time_now:[8,2,1,""],end_time:[8,2,1,""],environment_name:[8,2,1,""],host_name:[8,2,1,""],runtime_directory:[8,2,1,""],set_runtime_directory:[8,2,1,""],set_working_directory:[8,2,1,""],start_time:[8,2,1,""],working_directory:[8,2,1,""]},"cpl.environment.environment_name_enum":{EnvironmentNameEnum:[8,1,1,""]},"cpl.environment.environment_name_enum.EnvironmentNameEnum":{development:[8,3,1,""],production:[8,3,1,""],staging:[8,3,1,""],testing:[8,3,1,""]},"cpl.logging":{logger_abc:[9,0,0,"-"],logger_service:[9,0,0,"-"],logging_level_enum:[9,0,0,"-"],logging_settings:[9,0,0,"-"],logging_settings_name_enum:[9,0,0,"-"]},"cpl.logging.logger_abc":{LoggerABC:[9,1,1,""]},"cpl.logging.logger_abc.LoggerABC":{debug:[9,2,1,""],error:[9,2,1,""],fatal:[9,2,1,""],header:[9,2,1,""],info:[9,2,1,""],trace:[9,2,1,""],warn:[9,2,1,""]},"cpl.logging.logger_service":{Logger:[9,1,1,""]},"cpl.logging.logger_service.Logger":{create:[9,2,1,""],debug:[9,2,1,""],error:[9,2,1,""],fatal:[9,2,1,""],header:[9,2,1,""],info:[9,2,1,""],trace:[9,2,1,""],warn:[9,2,1,""]},"cpl.logging.logging_level_enum":{LoggingLevelEnum:[9,1,1,""]},"cpl.logging.logging_level_enum.LoggingLevelEnum":{DEBUG:[9,3,1,""],ERROR:[9,3,1,""],FATAL:[9,3,1,""],INFO:[9,3,1,""],OFF:[9,3,1,""],TRACE:[9,3,1,""],WARN:[9,3,1,""]},"cpl.logging.logging_settings":{LoggingSettings:[9,1,1,""]},"cpl.logging.logging_settings.LoggingSettings":{console:[9,2,1,""],filename:[9,2,1,""],from_dict:[9,2,1,""],level:[9,2,1,""],path:[9,2,1,""]},"cpl.logging.logging_settings_name_enum":{LoggingSettingsNameEnum:[9,1,1,""]},"cpl.logging.logging_settings_name_enum.LoggingSettingsNameEnum":{console_level:[9,3,1,""],file_level:[9,3,1,""],filename:[9,3,1,""],path:[9,3,1,""]},"cpl.mailing":{email:[10,0,0,"-"],email_client_abc:[10,0,0,"-"],email_client_service:[10,0,0,"-"],email_client_settings:[10,0,0,"-"],email_client_settings_name_enum:[10,0,0,"-"]},"cpl.mailing.email":{EMail:[10,1,1,""]},"cpl.mailing.email.EMail":{add_header:[10,2,1,""],add_receiver:[10,2,1,""],body:[10,2,1,""],check_mail:[10,2,1,""],get_content:[10,2,1,""],header:[10,2,1,""],header_list:[10,2,1,""],receiver:[10,2,1,""],receiver_list:[10,2,1,""],subject:[10,2,1,""],transceiver:[10,2,1,""]},"cpl.mailing.email_client_abc":{EMailClientABC:[10,1,1,""]},"cpl.mailing.email_client_abc.EMailClientABC":{connect:[10,2,1,""],send_mail:[10,2,1,""]},"cpl.mailing.email_client_service":{EMailClient:[10,1,1,""]},"cpl.mailing.email_client_service.EMailClient":{connect:[10,2,1,""],create:[10,2,1,""],login:[10,2,1,""],send_mail:[10,2,1,""]},"cpl.mailing.email_client_settings":{EMailClientSettings:[10,1,1,""]},"cpl.mailing.email_client_settings.EMailClientSettings":{credentials:[10,2,1,""],from_dict:[10,2,1,""],host:[10,2,1,""],port:[10,2,1,""],user_name:[10,2,1,""]},"cpl.mailing.email_client_settings_name_enum":{EMailClientSettingsNameEnum:[10,1,1,""]},"cpl.mailing.email_client_settings_name_enum.EMailClientSettingsNameEnum":{credentials:[10,3,1,""],host:[10,3,1,""],port:[10,3,1,""],user_name:[10,3,1,""]},"cpl.time":{time_format_settings:[11,0,0,"-"],time_format_settings_names_enum:[11,0,0,"-"]},"cpl.time.time_format_settings":{TimeFormatSettings:[11,1,1,""]},"cpl.time.time_format_settings.TimeFormatSettings":{date_format:[11,2,1,""],date_time_format:[11,2,1,""],date_time_log_format:[11,2,1,""],from_dict:[11,2,1,""],time_format:[11,2,1,""]},"cpl.time.time_format_settings_names_enum":{TimeFormatSettingsNamesEnum:[11,1,1,""]},"cpl.time.time_format_settings_names_enum.TimeFormatSettingsNamesEnum":{date_format:[11,3,1,""],date_time_format:[11,3,1,""],date_time_log_format:[11,3,1,""],time_format:[11,3,1,""]},"cpl.utils":{credential_manager:[12,0,0,"-"],pip:[12,0,0,"-"],string:[12,0,0,"-"]},"cpl.utils.credential_manager":{CredentialManager:[12,1,1,""]},"cpl.utils.credential_manager.CredentialManager":{build_string:[12,2,1,""],decrypt:[12,2,1,""],encrypt:[12,2,1,""]},"cpl.utils.pip":{Pip:[12,1,1,""]},"cpl.utils.pip.Pip":{get_executable:[12,2,1,""],get_outdated:[12,2,1,""],get_package:[12,2,1,""],install:[12,2,1,""],reset_executable:[12,2,1,""],set_executable:[12,2,1,""],uninstall:[12,2,1,""]},"cpl.utils.string":{String:[12,1,1,""]},"cpl.utils.string.String":{convert_to_camel_case:[12,2,1,""],convert_to_snake_case:[12,2,1,""],first_to_lower:[12,2,1,""],first_to_upper:[12,2,1,""],random_string:[12,2,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute"},terms:{"abstract":[1,2,5,6,7,8,9,10],"byte":12,"case":12,"char":[3,12],"class":[1,2,3,4,5,6,7,8,9,10,11,12],"default":3,"enum":[2,3,4,7,8,9,10,11],"function":[3,12],"int":[3,12],"new":3,"return":[2,3,5,6,7,8,9,10,12],"static":[2,10,12],"transient":7,"true":2,The:13,These:13,Useful:[3,12],abc:[1,2,3,5,6,7,8,9,10],about:13,activ:3,add:[2,7,10],add_configur:2,add_console_argu:2,add_db_context:7,add_environment_vari:2,add_head:10,add_json_fil:2,add_log:7,add_receiv:10,add_scop:7,add_singleton:7,add_transi:7,additional_argu:2,address:10,alias:2,ani:3,app:[1,13],applic:[0,3,13,14],application_abc:[0,14],application_build:[0,14],application_builder_abc:[0,14],application_environ:[0,14],application_environment_abc:[0,9,10,14],application_nam:8,applicationabc:1,applicationbuild:1,applicationbuilderabc:1,applicationenviron:8,applicationenvironmentabc:[8,9,10],appset:1,arg:[1,3,6,12],argument:[2,3],argument_error_funct:2,attribut:[2,4,9,10,11],auth_plugin:4,authplugin:4,back:3,background:3,background_color:3,background_color_enum:[0,14],backgroundcolorenum:3,banner:3,base64:12,base:[1,2,3,4,5,6,7,8,9,10,11,12],befor:3,blue:3,bodi:10,bool:[2,3,10],build:[1,12],build_servic:7,build_service_provid:7,build_str:12,call:[1,3],callabl:[2,3,7],camel:12,can:13,case_sensit:4,casesensit:4,chang:6,charact:3,check:10,check_mail:10,classmethod:[3,12],clear:3,close:3,collect:[2,3,7],color:3,color_reset:3,command:12,common:13,complex:13,config:[1,7],configur:[0,1,4,7,9,10,11,14],configuration_abc:[0,1,7,14],configuration_model_abc:[0,4,9,10,11,14],configuration_variable_name_enum:[0,14],configurationabc:[1,2,7],configurationmodelabc:[2,4,9,10,11],configurationvariablenameenum:2,configure_configur:1,configure_servic:1,connect:[0,4,6,10,14],connection_str:[4,5,6],connectionstr:4,consol:[0,2,9,14],console_argu:[0,14],console_cal:[0,14],console_level:9,consoleargu:2,consolecal:3,consoleloglevel:9,contain:1,context:[0,4,7,14],convert:[2,4,9,10,11,12],convert_to_camel_cas:12,convert_to_snake_cas:12,coordin:3,creat:[1,7,9,10,12,13],credenti:[4,10,12],credential_manag:[0,14],credentialmanag:12,current:8,cursor:3,cursor_background_color:3,cursor_foreground_color:3,custom:[1,2,8],cyan:3,databas:[0,7,14],database_connect:[0,4,14],database_connection_abc:[0,4,14],database_context:[0,4,14],database_context_abc:[0,4,7,14],database_model:[0,14],database_set:[0,5,6,7,14],database_settings_name_enum:[0,14],databaseconnect:5,databaseconnectionabc:5,databasecontext:6,databasecontextabc:[6,7],databaseset:[4,5,6,7],databasesettingsnameenum:4,date_format:11,date_time_format:11,date_time_log_format:11,date_time_now:8,dateformat:11,datetimeformat:11,datetimelogformat:11,db_context:7,db_context_typ:7,db_set:7,debug:9,decod:12,decrypt:12,defin:2,dependency_inject:[0,1,14],desktop:13,detail:13,develop:[8,13],dict:[2,3,4,9,10,11],directori:8,disabl:3,echo:4,effici:13,element:3,email:[0,14],email_client_abc:[0,14],email_client_servic:[0,14],email_client_set:[0,14],email_client_settings_name_enum:[0,14],emailcli:10,emailclientabc:10,emailclientset:10,emailclientsettingsnameenum:10,enabl:3,encod:[4,12],encrypt:12,end:3,end_tim:8,engin:[5,6],enterpris:13,entri:[1,3],enumer:[2,3,4,7,8,9,10,11],env:9,environ:[0,2,9,10,14],environment_nam:8,environment_name_enum:[0,14],environmentnameenum:8,error:[2,3,9],everyth:13,except:9,execut:12,exit:[3,9],fatal:9,file:2,file_level:9,fileloglevel:9,filenam:9,first:[12,13],first_to_low:12,first_to_upp:12,foreground:3,foreground_color:3,foreground_color_enum:[0,14],foregroundcolorenum:3,found:2,from:[1,2,13],from_dict:[2,4,9,10,11],get:12,get_configur:2,get_cont:10,get_execut:12,get_outd:12,get_packag:12,get_servic:7,given:[2,3,7,12],great:13,green:3,grei:3,handl:[3,12],has:3,header:[3,9,10],header_background_color:3,header_foreground_color:3,header_list:10,help:13,hold:3,host:10,host_nam:8,implement:7,info:9,inform:9,input:3,instal:12,instanc:[1,7],instance_typ:7,interact:3,intern:7,invalid:2,is_value_token_opt:2,json:2,key_typ:2,keyword:3,known:2,kwarg:3,last:3,learn:13,length:[3,12],level:9,librari:13,lifetim:7,line:3,list:[2,3,7,10,12],load:1,local:12,log:[0,10,14],logfil:9,logger:[7,9,10],logger_abc:[0,10,14],logger_servic:[0,14],loggerabc:[9,10],logging_level_enum:[0,14],logging_set:[0,14],logging_settings_name_enum:[0,14],logginglevelenum:9,loggingset:9,loggingsettingsnameenum:9,login:10,lower:12,magenta:3,mail:[0,14],mail_set:10,main:1,meant:13,menu:3,messag:[3,9],msg_len:3,name:[2,8,9],next:3,none:[2,3,7,9,10,12],object:[1,2,3,7,10,12],occur:2,off:9,on_blu:3,on_cyan:3,on_default:3,on_green:3,on_grei:3,on_magenta:3,on_r:3,on_whit:3,on_yellow:3,option:[2,3,7,9,10,12],option_background_color:3,option_foreground_color:3,outdat:12,output:[2,3],packag:[12,13],page:13,param:[5,6,7,8,9,10,12],path:[2,9],pip:[0,14],place:2,platform:13,point:[1,3],port:10,posit:3,prefix:2,prepar:1,print:3,product:8,properti:[2,3,4,5,6,7,8,9,10,11],provid:[1,7],python:13,random:12,random_str:12,read:[2,3],read_lin:3,receiv:10,receiver_list:10,red:3,repres:3,reset:[3,12],reset_cursor_posit:3,reset_execut:12,run:[1,3],runtim:8,runtime_directori:8,save:[2,6],save_chang:6,scope:7,search:2,search_typ:2,select:3,send:10,send_mail:10,server:[10,13],servic:[1,7],service_collect:[0,14],service_collection_abc:[0,14],service_descriptor:[0,14],service_lifetime_enum:[0,14],service_provid:[0,14],service_provider_abc:[0,1,14],service_typ:7,servicecollect:7,servicecollectionabc:7,servicedescriptor:7,servicelifetimeenum:7,serviceprovid:7,serviceproviderabc:[1,7],session:[5,6],set:[1,2,3,4,8,9,10,11,12],set_background_color:3,set_cursor_posit:3,set_execut:12,set_foreground_color:3,set_hold_back:3,set_runtime_directori:8,set_working_directori:8,should:2,show:3,shown:2,simpl:13,singleton:7,snake:12,sourc:12,specifi:2,spinner:3,spinner_background_color:3,spinner_foreground_color:3,spinner_thread:[0,14],spinnerthread:3,stage:8,standard:12,start_tim:8,startup:1,startup_abc:[0,14],startupabc:1,stderr:12,stdout:12,stop:3,stop_spin:3,store:2,str:[2,3,5,6,8,9,10,12],string:[0,3,5,6,9,10,14],subject:10,submodul:[0,14],system:12,tabl:[3,12],take:2,termin:3,test:8,text:3,text_background_color:3,text_foreground_color:3,thi:[1,13],thread:3,time:[0,9,14],time_format:[9,11],time_format_set:[0,9,14],time_format_settings_names_enum:[0,14],timeformat:11,timeformatset:[9,11],timeformatsettingsnamesenum:11,to_list:2,token:2,trace:9,traceback:3,transceiv:10,tree:9,type:[1,2,7],understand:13,uninstal:12,union:[2,3,7],upper:12,use:[1,13],use_startup:1,used:1,user_nam:10,usernam:10,util:[0,14],valid:10,valu:[2,3,4,7,8,9,10,11],value_token:2,variabl:2,warn:9,when:3,whether:2,which:[2,3],white:3,work:8,working_directori:8,write:[3,9],write_at:3,write_lin:3,write_line_at:3,yellow:3,you:13,your:13},titles:["CPL","cpl.application","cpl.configuration","cpl.console","cpl.database","cpl.database.connection","cpl.database.context","cpl.dependency_injection","cpl.environment","cpl.logging","cpl.mailing","cpl.time","cpl.utils","Introduction to the CPL Docs","cpl"],titleterms:{applic:1,application_abc:1,application_build:1,application_builder_abc:1,application_environ:8,application_environment_abc:8,background_color_enum:3,configur:2,configuration_abc:2,configuration_model_abc:2,configuration_variable_name_enum:2,connect:5,consol:3,console_argu:2,console_cal:3,context:6,cpl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],credential_manag:12,databas:[4,5,6],database_connect:5,database_connection_abc:5,database_context:6,database_context_abc:6,database_model:4,database_set:4,database_settings_name_enum:4,dependency_inject:7,doc:13,email:10,email_client_abc:10,email_client_servic:10,email_client_set:10,email_client_settings_name_enum:10,environ:8,environment_name_enum:8,foreground_color_enum:3,introduct:13,log:9,logger_abc:9,logger_servic:9,logging_level_enum:9,logging_set:9,logging_settings_name_enum:9,mail:10,manual:13,pip:12,service_collect:7,service_collection_abc:7,service_descriptor:7,service_lifetime_enum:7,service_provid:7,service_provider_abc:7,spinner_thread:3,startup_abc:1,string:12,submodul:4,time:11,time_format_set:11,time_format_settings_names_enum:11,util:12}}) \ No newline at end of file diff --git a/src/cpl/configuration/configuration.py b/src/cpl/configuration/configuration.py index 0aaf67ca..68e671a6 100644 --- a/src/cpl/configuration/configuration.py +++ b/src/cpl/configuration/configuration.py @@ -54,7 +54,9 @@ class Configuration(ConfigurationABC): Parameter --------- name: :class:`str` + Info name message: :class:`str` + Info message """ Console.set_foreground_color(ForegroundColorEnum.green) Console.write_line(f'[{name}] {message}') @@ -67,7 +69,9 @@ class Configuration(ConfigurationABC): Parameter --------- name: :class:`str` + Warning name message: :class:`str` + Warning message """ Console.set_foreground_color(ForegroundColorEnum.yellow) Console.write_line(f'[{name}] {message}') @@ -80,7 +84,9 @@ class Configuration(ConfigurationABC): Parameter --------- name: :class:`str` + Error name message: :class:`str` + Error message """ Console.set_foreground_color(ForegroundColorEnum.red) Console.write_line(f'[{name}] {message}') @@ -92,7 +98,9 @@ class Configuration(ConfigurationABC): Parameter --------- name: :class:`str` + Name of the variable value: :class:`any` + Value of the variable """ if name == ConfigurationVariableNameEnum.environment.value: self._application_environment.environment_name = EnvironmentNameEnum(value) @@ -113,8 +121,11 @@ class Configuration(ConfigurationABC): Parameter --------- argument: :class:`str` + Command as string argument_type: :class:`cpl.configuration.console_argument.ConsoleArgument` + Command type as ConsoleArgument next_arguments: list[:class:`str`] + Following arguments of argument Returns ------- diff --git a/src/cpl/configuration/configuration_abc.py b/src/cpl/configuration/configuration_abc.py index 0aaf7f17..046eb055 100644 --- a/src/cpl/configuration/configuration_abc.py +++ b/src/cpl/configuration/configuration_abc.py @@ -37,6 +37,7 @@ class ConfigurationABC(ABC): Parameter --------- prefix: :class:`str` + Prefix of the variables """ pass @@ -47,6 +48,7 @@ class ConfigurationABC(ABC): Parameter --------- argument: :class:`cpl.configuration.console_argument.ConsoleArgument` + Specifies the console argument """ pass @@ -85,7 +87,9 @@ class ConfigurationABC(ABC): Parameter --------- key_type: Union[:class:`str`, :class:`type`] + Type of the value value: :class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC` + Object of the value """ pass @@ -96,6 +100,7 @@ class ConfigurationABC(ABC): Parameter --------- search_type: Union[:class:`str`, Type[:class:`cpl.configuration.configuration_model_abc.ConfigurationModelABC`]] + Type to search for Returns ------- diff --git a/src/cpl/console/console.py b/src/cpl/console/console.py index c4336634..66140873 100644 --- a/src/cpl/console/console.py +++ b/src/cpl/console/console.py @@ -18,9 +18,7 @@ from cpl.console.spinner_thread import SpinnerThread class Console: - """ - Useful functions for handling with input and output - """ + r"""Useful functions for handling with input and output""" colorama.init() _is_first_write = True @@ -42,9 +40,7 @@ class Console: _selected_menu_cursor_foreground_color: ForegroundColorEnum = ForegroundColorEnum.default _selected_menu_cursor_background_color: BackgroundColorEnum = BackgroundColorEnum.default - """ - Properties - """ + """Properties""" @classmethod @property @@ -56,9 +52,7 @@ class Console: def foreground_color(cls) -> str: return str(cls._foreground_color.value) - """ - Settings - """ + """Settings""" @classmethod def set_hold_back(cls, value: bool): @@ -66,10 +60,12 @@ class Console: @classmethod def set_background_color(cls, color: Union[BackgroundColorEnum, str]): - """ - Sets the background color - :param color: - :return: + r"""Sets the background color + + Parameter + --------- + color: Union[:class:`cpl.console.background_color_enum.BackgroundColorEnum`, :class:`str`] + Background color of the console """ if type(color) is str: cls._background_color = BackgroundColorEnum[color] @@ -78,10 +74,12 @@ class Console: @classmethod def set_foreground_color(cls, color: Union[ForegroundColorEnum, str]): - """ - Sets the foreground color - :param color: - :return: + r"""Sets the foreground color + + Parameter + --------- + color: Union[:class:`cpl.console.background_color_enum.BackgroundColorEnum`, :class:`str`] + Foreground color of the console """ if type(color) is str: cls._foreground_color = ForegroundColorEnum[color] @@ -90,37 +88,40 @@ class Console: @classmethod def reset_cursor_position(cls): - """ - Resets cursor position - :return: - """ + r"""Resets cursor position""" cls._x = None cls._y = None @classmethod def set_cursor_position(cls, x: int, y: int): - """ - Sets cursor position - :param x: - :param y: - :return: + r"""Sets cursor position + + Parameter + --------- + x: :class:`int` + X coordinate + y: :class:`int` + Y coordinate """ cls._x = x cls._y = y - """ - Useful protected methods - """ + """Useful protected functions""" @classmethod def _output(cls, string: str, x: int = None, y: int = None, end: str = None): - """ - Prints given output with given format - :param string: - :param x: - :param y: - :param end: - :return: + r"""Prints given output with given format + + Parameter + --------- + string: :class:`str` + Message to print + x: :class:`int` + X coordinate + y: :class:`int` + Y coordinate + end: :class:`str` + End character of the message (could be \n) """ if cls._is_first_write: cls._is_first_write = False @@ -149,10 +150,7 @@ class Console: @classmethod def _show_select_menu(cls): - """ - Shows the select menu - :return: - """ + r"""Shows the select menu""" if not cls._is_first_select_menu_output: for _ in range(0, len(cls._select_menu_items) + 1): sys.stdout.write('\x1b[1A\x1b[2K') @@ -176,10 +174,12 @@ class Console: @classmethod def _select_menu_key_press(cls, key: Key): - """ - Event function when key press is detected - :param key: - :return: + r"""Event function when key press is detected + + Parameter + --------- + key: :class:`pynput.keyboard.Key` + Pressed key """ if key == Key.down: if cls._selected_menu_item_index == len(cls._select_menu_items) - 1: @@ -196,16 +196,16 @@ class Console: elif key == Key.enter: return False - """ - Useful public methods - """ + """ Useful public functions""" @classmethod def banner(cls, string: str): - """ - Prints the string as a banner - :param string: - :return: + r"""Prints the string as a banner + + Parameter + --------- + string: :class:`str` + Message to print as banner """ if cls._disabled: return @@ -219,19 +219,13 @@ class Console: @classmethod def color_reset(cls): - """ - Resets color - :return: - """ + r"""Resets the color settings""" cls._background_color = BackgroundColorEnum.default cls._foreground_color = ForegroundColorEnum.default @classmethod def clear(cls): - """ - Clears the console - :return: - """ + r"""Clears the console""" if cls._hold_back: cls._hold_back_calls.append(ConsoleCall(cls.clear)) return @@ -240,10 +234,7 @@ class Console: @classmethod def close(cls): - """ - Close the application - :return: - """ + r"""Closes the application""" if cls._disabled: return @@ -258,19 +249,19 @@ class Console: @classmethod def disable(cls): - """ - Disable console interaction - :return: - """ + r"""Disables console interaction""" cls._disabled = True @classmethod def error(cls, string: str, tb: str = None): - """ - Prints an error with traceback - :param string: - :param tb: - :return: + r"""Prints an error with traceback + + Parameter + --------- + string: :class:`str` + Error message + tb: :class:`str` + Error traceback """ if cls._disabled: return @@ -288,18 +279,21 @@ class Console: @classmethod def enable(cls): - """ - Enable console interaction - :return: - """ + r"""Enables console interaction""" cls._disabled = False @classmethod def read(cls, output: str = None) -> str: - """ - Read in line - :param output: - :return: + r"""Reads in line + + Parameter + --------- + output: :class:`str` + String to print before input + + Returns + ------- + input() """ if output is not None and not cls._hold_back: cls.write_line(output) @@ -308,10 +302,16 @@ class Console: @classmethod def read_line(cls, output: str = None) -> str: - """ - Reads in next line - :param output: - :return: + r"""Reads in next line + + Parameter + --------- + output: :class:`str` + String to print before input + + Returns + ------- + input() """ if cls._disabled and not cls._hold_back: return '' @@ -325,11 +325,14 @@ class Console: @classmethod def table(cls, header: list[str], values: list[list[str]]): - """ - Prints a table with header and values - :param header: - :param values: - :return: + r"""Prints a table with header and values + + Parameter + --------- + header: List[:class:`str`] + Header of the table + values: List[List[:class:`str`]] + Values of the table """ if cls._disabled: return @@ -352,18 +355,32 @@ class Console: cursor_foreground_color: Union[str, ForegroundColorEnum] = ForegroundColorEnum.default, cursor_background_color: Union[str, BackgroundColorEnum] = BackgroundColorEnum.default ) -> str: - """ - Prints select menu - :param char: - :param message: - :param options: - :param header_foreground_color: - :param header_background_color: - :param option_foreground_color: - :param option_background_color: - :param cursor_foreground_color: - :param cursor_background_color: - :return: Selected option as str + r"""Prints select menu + + Parameter + --------- + 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.console.foreground_color_enum.ForegroundColorEnum`] + Foreground color of the header + header_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`] + Background color of the header + option_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`] + Foreground color of the options + option_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`] + Background color of the options + cursor_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`] + Foreground color of the cursor + cursor_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`] + Background color of the cursor + + Returns + ------- + Selected option as :class:`str` """ cls._selected_menu_item_char = char cls.options = options @@ -396,18 +413,30 @@ class Console: spinner_foreground_color: Union[str, ForegroundColorEnum] = None, text_background_color: Union[str, BackgroundColorEnum] = None, spinner_background_color: Union[str, BackgroundColorEnum] = None, **kwargs) -> any: - """ - Shows spinner and calls given function - When function has ended the spinner stops - :param message: - :param call: - :param args: - :param text_foreground_color: - :param spinner_foreground_color: - :param text_background_color: - :param spinner_background_color: - :param kwargs: - :return: Return value of call + r"""Shows spinner and calls given function, when function has ended the spinner stops + + Parameter + --------- + message: :class:`str` + 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.console.foreground_color_enum.ForegroundColorEnum`] + Foreground color of the text + spinner_foreground_color: Union[:class:`str`, :class:`cpl.console.foreground_color_enum.ForegroundColorEnum`] + Foreground color of the spinner + text_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`] + Background color of the text + spinner_background_color: Union[:class:`str`, :class:`cpl.console.background_color_enum.BackgroundColorEnum`] + Background color of the spinner + kwargs: :class:`dict` + Keyword arguments of the call + + Returns + ------- + Return value of call """ if cls._hold_back: cls._hold_back_calls.append(ConsoleCall(cls.spinner, message, call, *args)) @@ -454,11 +483,14 @@ class Console: @classmethod def write(cls, *args, end=''): - """ - Prints in active line - :param args: - :param end: - :return: + r"""Prints in active line + + Parameter + --------- + args: :class:`list` + Elements to print + end: :class:`str` + Last character to print """ if cls._disabled: return @@ -472,12 +504,16 @@ class Console: @classmethod def write_at(cls, x: int, y: int, *args): - """ - Prints at given position - :param x: - :param y: - :param args: - :return: + r"""Prints at given position + + Parameter + --------- + x: :class:`int` + X coordinate + y: :class:`int` + Y coordinate + args: :class:`list` + Elements to print """ if cls._disabled: return @@ -491,10 +527,12 @@ class Console: @classmethod def write_line(cls, *args): - """ - Prints to new line - :param args: - :return: + r"""Prints to new line + + Parameter + --------- + args: :class:`list` + Elements to print """ if cls._disabled: return @@ -510,12 +548,16 @@ class Console: @classmethod def write_line_at(cls, x: int, y: int, *args): - """ - Prints new line at given position - :param x: - :param y: - :param args: - :return: + r"""Prints new line at given position + + Parameter + --------- + x: :class:`int` + X coordinate + y: :class:`int` + Y coordinate + args: :class:`list` + Elements to print """ if cls._disabled: return diff --git a/src/cpl/console/console_call.py b/src/cpl/console/console_call.py index 1a8c10f8..7680a880 100644 --- a/src/cpl/console/console_call.py +++ b/src/cpl/console/console_call.py @@ -2,13 +2,17 @@ from collections import Callable class ConsoleCall: + r"""Represents a console call, for hold back when spinner is active + + Parameter + --------- + function: :class:`Callable` + Function to call + args: :class:`list` + List of arguments + """ def __init__(self, function: Callable, *args): - """ - Represents a console call, for hold back when spinner is active - :param function: - :param args: - """ self._func = function self._args = args diff --git a/src/cpl/console/spinner_thread.py b/src/cpl/console/spinner_thread.py index 7b13d963..e20b431a 100644 --- a/src/cpl/console/spinner_thread.py +++ b/src/cpl/console/spinner_thread.py @@ -10,14 +10,19 @@ from cpl.console.foreground_color_enum import ForegroundColorEnum class SpinnerThread(threading.Thread): + r"""Thread to show spinner in terminal + + Parameter + --------- + msg_len: :class:`int` + Length of the message + foreground_color: :class:`cpl.console.foreground_color.ForegroundColorEnum` + Foreground color of the spinner + background_color: :class:`cpl.console.background_color.BackgroundColorEnum` + Background color of the spinner + """ def __init__(self, msg_len: int, foreground_color: ForegroundColorEnum, background_color: BackgroundColorEnum): - """ - Thread to show spinner in terminal - :param msg_len: - :param foreground_color: - :param background_color: - """ threading.Thread.__init__(self) self._msg_len = msg_len @@ -29,19 +34,13 @@ class SpinnerThread(threading.Thread): @staticmethod def _spinner(): - """ - Selects active spinner char - :return: - """ + r"""Selects active spinner char""" while True: for cursor in '|/-\\': yield cursor def _get_color_args(self) -> list[str]: - """ - Creates color arguments - :return: - """ + r"""Creates color arguments""" color_args = [] if self._foreground_color is not None: color_args.append(str(self._foreground_color.value)) @@ -52,10 +51,7 @@ class SpinnerThread(threading.Thread): return color_args def run(self) -> None: - """ - Entry point of thread, shows the spinner - :return: - """ + r"""Entry point of thread, shows the spinner""" columns = 0 if sys.platform == 'win32': columns = os.get_terminal_size().columns @@ -90,18 +86,12 @@ class SpinnerThread(threading.Thread): print(colored(end_msg, *self._get_color_args()), end='') def stop_spinning(self): - """ - Stops the spinner - :return: - """ + r"""Stops the spinner""" self._is_spinning = False time.sleep(0.1) def exit(self): - """ - Stops the spinner - :return: - """ + r"""Stops the spinner""" self._is_spinning = False self._exit = True time.sleep(0.1)