Table of Contents

Class: Indirect ./src/peak/naming/names.py

Indirect lookup via another IComponentKey

Use this in e.g. binding.Obtain to look up something indirectly, like:

        class MyClass(binding.Component):

            socketURL = "fd:0"

            socket = binding.Obtain(
                naming.Indirect('socketURL'), adaptTo=[IListeningSocket]
            )

Instances of the above class will have a socket attribute that is the result of looking up the URL provided by the instance's socketURL attribute at runtime.

Base Classes   
object
Methods   
__init__
findComponent
  __init__ 
__init__ (
        self,
        key,
        default=NOT_GIVEN,
        )

Set up an Indirect instance. key must provide IComponentKey

  findComponent 
findComponent (
        self,
        component,
        default=NOT_GIVEN,
        )


Table of Contents

This document was automatically generated on Mon Apr 22 01:11:05 2024 by HappyDoc version 2.1