Table of Contents

Class: PluginsFor ./src/peak/binding/components.py

Component key that finds plugins matching a configuration key

Usage:

        # get a list of 'my.plugins.X' plugins, sorted by property name
        myPlugins = binding.Obtain( binding.PluginsFor('my.plugins') )

        # get an unsorted list of all 'foo.bar' plugins
        myPlugins = binding.Obtain(
            binding.PluginsFor('foo.bar', sortKeys=False)
        )

This key type works similarly to PluginKeys(), except that it returns the plugins themselves, rather than their configuration keys.

sortBy is either a false value or a callable that will be applied to each plugin's key to get a value for sorting purposes. If set to a false value, plugins will be in the same order as their keys are yielded by config.iterKeys(). sortBy defaults to str, which means the plugins will be sorted based on the string form of the keys used to retrieve them.

Base Classes   
PluginKeys
    object
Methods   
findComponent
  findComponent 
findComponent (
        self,
        component,
        default=NOT_GIVEN,
        )


Table of Contents

This document was automatically generated on Mon May 6 01:11:02 2024 by HappyDoc version 2.1