absfuyu.util package

Absufyu: Utilities

Some random utilities

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

absfuyu.util.get_installed_package()[source]

Return a list of installed packages

Returns:

List of installed packages

Return type:

list[str]

Changed in version 2.7.1: Use ``pkgutil`` lib

absfuyu.util.set_min(current_value: int | float, *, min_value: int | float = 0) int | float[source]

Return min_value when current_value < min_value

Parameters:
  • current_value (int | float) – Current value

  • min_value (int | float) – Minimum value (Default: 0)

Returns:

Analyzed value

Return type:

int | float

Example:

>>> set_min(-1)
0

Deprecated in version 5.0.0

absfuyu.util.set_max(current_value: int | float, *, max_value: int | float = 100) int | float[source]

Return max_value when current_value > max_value

Parameters:
  • current_value (int | float) – Current value

  • max_value (int | float) – Maximum value (Default: 100)

Returns:

Analyzed value

Return type:

int | float

Example:

>>> set_max(101)
100

Deprecated in version 5.0.0

absfuyu.util.set_min_max(current_value: int | float, *, min_value: int | float = 0, max_value: int | float = 100) int | float[source]

Return min_value | max_value when current_value is outside [min_value, max_value]

Parameters:
  • current_value (int | float) – Current value

  • min_value (int | float) – Minimum value (Default: 0)

  • max_value (int | float) – Maximum value (Default: 100)

Returns:

Analyzed value

Return type:

int | float

Example:

>>> set_min_max(808)
100
absfuyu.util.stop_after_day(year: int | None = None, month: int | None = None, day: int | None = None) None[source]

Stop working after specified day. Put the function at the begining of the code is recommended.

Parameters:
  • year (int) – Desired year (Default: None)

  • month (int) – Desired month (Default: None)

  • day (int) – Desired day (Default: None - 1 day trial)

Added in version 3.2.0

Submodules