cpl.utils

cpl.utils.credential_manager module

class cpl.utils.credential_manager.CredentialManager

Bases: object

Handles credentials

static build_string(string: str, credentials: str)

Builds string with credentials in it :param string: :param credentials: :return:

static decrypt(string: str)str

Decode with base64 :param string: :return:

static encrypt(string: str)str

Encode with base64 :param string: :return:

cpl.utils.pip module

class cpl.utils.pip.Pip

Bases: object

Executes pip commands

classmethod get_executable()str
classmethod get_outdated()bytes

Gets table of outdated packages :return:

classmethod get_package(package: str)Optional[str]

Gets given package py local pip list :param package: :return:

classmethod install(package: str, *args, source: Optional[str] = None, stdout=None, stderr=None)

Installs given package :param package: :param args: :param source: :param stdout: :param stderr: :return:

classmethod reset_executable()

Resets the executable to system standard :return:

classmethod set_executable(executable: str)

Sets the executable :param executable: :return:

classmethod uninstall(package: str, stdout=None, stderr=None)

Uninstalls given package :param package: :param stdout: :param stderr: :return:

cpl.utils.string module

class cpl.utils.string.String

Bases: object

Useful functions for strings

static convert_to_camel_case(chars: str)str

Converts string to camel case :param chars: :return:

static convert_to_snake_case(chars: str)str

Converts string to snake case :param chars: :return:

static first_to_lower(chars: str)str

Converts first char to lower :param chars: :return:

static first_to_upper(chars: str)str

Converts first char to upper :param chars: :return:

static random_string(chars: str, length: int)str

Creates random string by given chars and length