How to use the wirerope.RopeCore function in wirerope

To help you get started, we’ve selected a few wirerope 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 youknowone / ring / ring / func / base.py View on Github external
class PublicRing(object):

    def __init__(self, rope):
        self._rope = rope

    def key(self, func):
        self._rope.compose_key = func

    def encode(self, func):
        self._rope._encode = func

    def decode(self, func):
        self._rope._decode = func


class RingRope(RopeCore):
    def __init__(self, *args, **kwargs):
        super(RingRope, self).__init__(*args, **kwargs)

        self._encode = None
        self._decode = None

        self.ring = PublicRing(self)

    def compose_key(self, *bound_args, **kwargs):
        config = self.config

        _ignorable_keys = suggest_ignorable_keys(
            self.callable, self.config.ignorable_keys)
        _key_prefix = suggest_key_prefix(self.callable, config.key_prefix)

        c = self.callable

wirerope

'Turn functions and methods into fully controllable objects'

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis