ds_resource_plugin_py_lib.libs.utils ==================================== .. py:module:: ds_resource_plugin_py_lib.libs.utils .. autoapi-nested-parse:: **File:** ``__init__.py`` **Region:** ``ds_resource_plugin_py_lib/libs/utils`` Description ----------- Internal shared libraries used by this package (utilities). Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/ds_resource_plugin_py_lib/libs/utils/import_string/index /autoapi/ds_resource_plugin_py_lib/libs/utils/sanitize/index Functions --------- .. autoapisummary:: ds_resource_plugin_py_lib.libs.utils.import_string ds_resource_plugin_py_lib.libs.utils.sanitize_version Package Contents ---------------- .. py:function:: import_string(dotted_path: str) -> Any Import a dotted module path and return the attribute/class designated by the last name in the path. :param dotted_path: The dotted module path to import. :returns: The attribute/class designated by the last name in the path. Raise ImportError if the import failed. .. py:function:: sanitize_version(version: str) -> str Sanitize version string to ensure it follows a consistent format. We can receive versions written as semver (v1.0.0) or just the number (1.0.0). This function will strip any leading 'v' and whitespace. :param version: The version string to sanitize. :returns: A sanitized version string.