labthings_fastapi.utilities.object_reference_to_object ====================================================== .. py:module:: labthings_fastapi.utilities.object_reference_to_object .. autoapi-nested-parse:: Load objects from object references. Functions --------- .. autoapisummary:: labthings_fastapi.utilities.object_reference_to_object.object_reference_to_object Module Contents --------------- .. py:function:: object_reference_to_object(object_reference: str) -> Any Convert a string reference to an object. This is taken from: https://packaging.python.org/en/latest/specifications/entry-points/ The format of the string is `module_name:qualname` where `qualname` is the fully qualified name of the object within the module. This is the same format used by entrypoints` in `setup.py` files. :param object_reference: a string referencing a Python object to import. :return: the Python object. :raise ImportError: if the referenced object cannot be found or imported.