Mixins

Mixins are not blocks. Instead, mixins add commonly used functionality to existing blocks. You can add functions such as persistence, group-by, or retry to blocks. Mixins are shared on GitHub in the mixin repository.

Mixins follow the Python mixin model, thus any block mixins need to be extended prior to extending the base block class. You can see an example of using the persistence and group-by mixins in the Buffer block.

from nio.block.base import Block
from nio.block.mixins import Persistence, GroupBy

class Buffer(Persistence, GroupBy, Block):

Docstrings inside each mixin provide more information on each mixin's functionality and arguments.

results matching ""

    No results matching ""