chunkipy.utils
Shared utility helpers used across chunkipy internals and optional extras.
Functions
|
Build the installation hint shown when an optional dependency is missing. |
|
Import an optional dependency and optionally fetch named attributes. |
Exceptions
Raised when an optional dependency required by an API is not installed. |
- exception chunkipy.utils.MissingDependencyError[source]
Bases:
ExceptionRaised when an optional dependency required by an API is not installed.
- chunkipy.utils.format_instructions(*, extra, package_name)[source]
Build the installation hint shown when an optional dependency is missing.
- chunkipy.utils.import_dependencies(extra, package_name, attribute_names=None)[source]
Import an optional dependency and optionally fetch named attributes.
- Parameters:
- Returns:
The imported module when
attribute_namesis empty, otherwise a list containing the module followed by the requested attributes.- Raises:
MissingDependencyError – If the module or any requested attribute cannot be imported.