How to use the omegaml.util.extend_instance function in omegaml

To help you get started, we’ve selected a few omegaml 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 omegaml / omegaml / omegaml / mdataframe.py View on Github external
def _apply_mixins(self, *args, **kwargs):
        """
        apply mixins in defaults.OMEGA_MDF_MIXINS
        """
        from omegaml import settings
        defaults = settings()
        for mixin, applyto in defaults.OMEGA_MDF_MIXINS:
            if any(v in self._applyto for v in applyto.split(',')):
                extend_instance(self, mixin, *args, **kwargs)
github omegaml / omegaml / omegaml / mixins / mdf / apply.py View on Github external
def _apply_mixins(self):
        """
        apply mixins in defaults.OMEGA_MDF_APPLY_MIXINS
        """
        from omegaml import settings
        defaults = settings()
        for mixin, applyto in defaults.OMEGA_MDF_APPLY_MIXINS:
            if any(v in self.caller._applyto for v in applyto.split(',')):
                extend_instance(self, mixin)
github omegaml / omegaml / omegaml / store / base.py View on Github external
def register_mixin(self, mixincls):
        """
        register a mixin class

        :param mixincls: (class) the mixin class 
        """
        self.defaults.OMEGA_STORE_MIXINS.append(mixincls)
        extend_instance(self, mixincls)
        return self
github omegaml / omegaml / omegaml / runtimes / modelproxy.py View on Github external
def apply_mixins(self):
        """
        apply mixins in defaults.OMEGA_RUNTIME_MIXINS
        """
        from omegaml import settings
        defaults = settings()
        for mixin in defaults.OMEGA_RUNTIME_MIXINS:
            extend_instance(self, mixin)
github omegaml / omegaml / omegaml / store / base.py View on Github external
def _apply_mixins(self):
        """
        apply mixins in defaults.OMEGA_STORE_MIXINS
        """
        for mixin in self.defaults.OMEGA_STORE_MIXINS:
            extend_instance(self, mixin)