absfuyu.core package

Absfuyu: Core

Bases for other features

Version: 5.1.0 Date updated: 10/03/2025 (dd/mm/yyyy)

class absfuyu.core.CLITextColor[source]

Bases: object

Color code for text in terminal

WHITE = '\x1b[37m'
BLACK = '\x1b[30m'
BLUE = '\x1b[34m'
GRAY = '\x1b[90m'
GREEN = '\x1b[32m'
RED = '\x1b[91m'
DARK_RED = '\x1b[31m'
MAGENTA = '\x1b[35m'
YELLOW = '\x1b[33m'
RESET = '\x1b[39m'
class absfuyu.core.ShowAllMethodsMixin[source]

Bases: object

Show all methods of the class and its parent class minus object class

This class is meant to be used with other class

Example:

>>> class TestClass(ShowAllMethodsMixin):
...     def method1(self): ...
>>> TestClass._get_methods_and_properties()
{
    "ShowAllMethodsMixin": MethodNPropertyList(
        classmethods=[
            "_get_methods_and_properties",
            "show_all_methods",
            "show_all_properties",
        ]
    ),
    "TestClass": MethodNPropertyList(
        methods=["method1"]
    ),
}
classmethod show_all_methods(print_result: bool = False, include_classmethod: bool = True, classmethod_indicator: str = '<classmethod>', include_staticmethod: bool = True, staticmethod_indicator: str = '<staticmethod>', include_private_method: bool = False) dict[str, list[str]][source]

Class method to display all methods of the class and its parent classes, including the class in which they are defined in alphabetical order.

Parameters:
  • print_result (bool, optional) – Beautifully print the output, by default False

  • include_classmethod (bool, optional) – Whether to include classmethod in the output, by default True

  • classmethod_indicator (str, optional) – A string used to mark classmethod in the output. This string is appended to the name of each classmethod to visually differentiate it from regular instance methods, by default "<classmethod>"

  • include_staticmethod (bool, optional) – Whether to include staticmethod in the output, by default True

  • staticmethod_indicator (str, optional) – A string used to mark staticmethod in the output. This string is appended to the name of each staticmethod to visually differentiate it from regular instance methods, by default "<staticmethod>"

  • include_private_method (bool, optional) – Whether to include private method in the output, by default False

Returns:

A dictionary where keys are class names and values are lists of method names.

Return type:

dict[str, list[str]]

classmethod show_all_properties(print_result: bool = False) dict[str, list[str]][source]

Class method to display all properties of the class and its parent classes, including the class in which they are defined in alphabetical order.

Parameters:

print_result (bool, optional) – Beautifully print the output, by default False

Returns:

A dictionary where keys are class names and values are lists of property names.

Return type:

dict[str, list[str]]

class absfuyu.core.BaseClass[source]

Bases: ShowAllMethodsMixin, AutoREPRMixin

Base class

absfuyu.core.tqdm(iterable, *args, **kwargs)[source]

Dummy tqdm function, install package tqdm to fully use this feature

absfuyu.core.unidecode(*args, **kwargs)[source]

Dummy unidecode function, install package unidecode to fully use this feature

Submodules