Source

callchain / callchain / lazy_man / chainlet.py

Full commit
# -*- coding: utf-8 -*-
'''lazy manually balanced chainlets'''

from appspace import appifies
from twoq.lazy import ManQMixin
from twoq.mapping import DelayMixin, RepeatMixin, MapMixin
from twoq.reducing import MathMixin, TruthMixin, ReduceMixin
from twoq.ordering import RandomMixin, OrderMixin, CombineMixin
from twoq.filtering import FilterMixin, CollectMixin, SetMixin, SliceMixin

from callchain.chainlet import qkeys
from callchain.chainlet.base import Chainlet


class chainlet(Chainlet, ManQMixin):

    '''chainlet'''


@appifies(qkeys.KDelay)
class delaylet(Chainlet, ManQMixin, DelayMixin):

    '''delayed mapping chainlet'''


@appifies(qkeys.KRepeat)
class repeatlet(Chainlet, ManQMixin, RepeatMixin):

    '''repeat chainlet'''


@appifies(qkeys.KMap)
class maplet(Chainlet, ManQMixin, MapMixin):

    '''mapping chainlet'''


@appifies(qkeys.KCollect)
class collectlet(Chainlet, ManQMixin, CollectMixin):

    '''collecting chainlet'''


@appifies(qkeys.KSet)
class setlet(Chainlet, ManQMixin, SetMixin):

    '''seting chainlet'''


@appifies(qkeys.KSlice)
class slicelet(Chainlet, ManQMixin, SliceMixin):

    '''slicing chainlet'''


@appifies(qkeys.KFilter)
class filterlet(Chainlet, ManQMixin, FilterMixin):

    '''filtering chainlet'''


@appifies(qkeys.KRandom)
class randomlet(Chainlet, ManQMixin, RandomMixin):

    '''randomizing chainlet'''


@appifies(qkeys.KOrder)
class orderlet(Chainlet, ManQMixin, OrderMixin):

    '''ordering chainlet'''


@appifies(qkeys.KMath)
class mathlet(Chainlet, ManQMixin, MathMixin):

    '''mathing chainlet'''


@appifies(qkeys.KReduce)
class reducelet(Chainlet, ManQMixin, ReduceMixin):

    '''reducing chainlet'''


@appifies(qkeys.KCombine)
class combinelet(Chainlet, ManQMixin, CombineMixin):

    '''combining chainlet'''


@appifies(qkeys.KTruth)
class truthlet(Chainlet, ManQMixin, TruthMixin):

    '''truthing chainlet'''