pyfileconf.selector.models package

Submodules

pyfileconf.selector.models.itemview module

class pyfileconf.selector.models.itemview.ItemView(section_path_str, selector=None)[source]

Bases: object

Class for representing a pipeline manager unit (function, pipeline, data source) without needing that unit to be loaded into pipeline manager. Allows using selector in config files and in app, by delaying looking up the item until an attribute/method is accessed or item is called.

__init__(section_path_str, selector=None)[source]

Initialize self. See help(type(self)) for accurate signature.

classmethod from_section_path_str(section_path_str)[source]

Constructs an ItemView from a section path str

Parameters

section_path_str (str) – Must be the full section path str containing the pipeline manager name

Return type

ItemView

Returns

property item
property type
Return type

Type

pyfileconf.selector.models.itemview.is_item_view(obj)[source]

Determine whether an object is an ItemView.

When using the Selector, objects are proxied by ItemViews until an attribute is accessed. The ItemView is set up so that it will work nearly completely like the original object, including isinstance checks. In fact isinstance(item, ItemView) will always return False on an ItemView as the class appears to be the original class. This function is the preferred way to check whether an object is an ItemView.

Parameters

obj (Any) – An object which may or may not be an ItemView

Return type

bool

Returns

Whether the object is an ItemView

pyfileconf.selector.models.selector module

class pyfileconf.selector.models.selector.Selector[source]

Bases: object

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

get_type(section_path_str)[source]