packing_packages.utils package

utils module for packing_packages.

This module provides utility functions and classes for the packing_packages package. It includes functions for checking if a package is installed, creating dummy progress bars, and checking if an argument is passed to a function.

packing_packages.utils.check_encoding(encoding: str | None) str

Check if the encoding is valid.

Parameters:

encoding (str) – encoding name

Returns:

encoding name

Return type:

str

class packing_packages.utils.dummy_tqdm(_dummy_tqdm__iterable: Iterable[T], *args, **kwargs)

Bases: Iterable[T]

dummy class for ‘tqdm’

Parameters:

__iterable (Iterable[T]) – iterable object

packing_packages.utils.is_argument(__callable: Callable[[...], Any], arg_name: str) bool

Check to see if it is included in the callable argument.

Parameters:
  • __callable (Callable)

  • arg_name (str) – argument name

Returns:

if included, True

Return type:

bool

packing_packages.utils.is_installed(package_name: str) bool

Check if the package is installed.

Parameters:

package_name (str) – package name like sklearn

Returns:

if installed, True

Return type:

bool