wirerope
¶
wirerope.wire
— end-point instant for each bound method¶
-
class
wirerope.wire.
Wire
(rope, owner, binding)¶ The core data object for each function for bound method.
Inherit this class to implement your own Wire classes.
- For normal functions, each function is directly wrapped by Wire.
- For any methods or descriptors (including classmethod, staticmethod),
each one is wrapped by
wirerope.rope.MethodRopeMixin
and it creates Wire object for each bound object.
wirerope.rope
— Wire access dispatcher for descriptor type.¶
-
class
wirerope.rope.
WireRope
(wire_class, core_class=<class 'wirerope.rope.RopeCore'>, wraps=False, rope_args=None)¶ The end-user wrapper for callables.
Any callable can be wrapped by this class regardless of its concept - free function, method, property or even more weird one. The calling type is decided by each call and redirected to proper RopeMixin.
The rope will detect method or property owner by needs. It also will return or call their associated wirerope.wire.Wire object - which are the user defined behavior.
-
class
wirerope.rope.
RopeCore
(callable, rope)¶ The base rope object.
To change rope behavior, create a subclass or compatible class and pass it to core_class argument of :class wirerope.rope.WireRope`.