Skip to content
New: Star-import, signal unraveling, Python 3.12 support, and more

# chaining module

Utilities for chaining.

## Chainable class

    Chainable()

Class representing an object that can be chained.

Subclasses

- Configured

### pipe class method

    Chainable.pipe(
        func,
        *args,
        **kwargs
    )

Apply a chainable function that expects a Chainable instance.

Can be called as a class method, but then will pass only `*args` and `**kwargs`.

Argument `func` can be a function, a string denoting a (deep) attribute to be resolved with deep_getattr(), or a tuple where the first element is one of the above and the second element is a positional argument or keyword argument where to pass the instance. If not a tuple, passes the instance as the first positional argument. If a string and the target function is an instance method, won't pass the instance since it's already bound to this instance.

#### Cookie consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.

- Google Analytics
- GitHub

Manage settings