module_attribute

glotaran.deprecation.deprecation_utils.module_attribute(module_qual_name: str, attribute_name: str) Any[source]

Import and return the attribute (e.g. function or class) of a module.

This is basically the same as from module_name import attribute_name as return_value where this function returns return_value.

Parameters:
  • module_qual_name (str) – Fully qualified name for a module e.g. glotaran.model.base_model

  • attribute_name (str) – Name of the attribute e.g. Model

Returns:

Attribute of the module, e.g. a function or class.

Return type:

Any