How to use the pcdsutils.utils.get_instance_by_name function in pcdsutils

To help you get started, we’ve selected a few pcdsutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pcdshub / typhon / typhos / display.py View on Github external
template : str, optional
            Set the ``display_template``.

        macros : dict, optional
            Macro substitutions to be placed in template.

        **kwargs
            Extra arguments are used at device instantiation.

        Returns
        -------
        TyphosDeviceDisplay
        """
        try:
            obj = pcdsutils.utils.get_instance_by_name(klass, **kwargs)
        except Exception:
            logger.exception('Failed to generate TyphosDeviceDisplay from '
                             'device %s', obj)
            return None

        return cls.from_device(obj, template=template, macros=macros)

pcdsutils

PCDS Python Utilities

Copyright (c) 2023, The Board…
Latest version published 5 months ago

Package Health Score

57 / 100
Full package analysis