register

toloka.streaming.pipeline.Pipeline.register | Source code

register(self, observer: BaseObserver)

Register given observer.

Parameters description

ParametersTypeDescription
observerBaseObserver

Observer object.

  • Returns:

    The same observer object. It's usable to write one-liners.

  • Return type:

    BaseObserver

Examples:

Register observer.

observer = SomeObserver(pool_id='123')
observer.do_some_preparations(...)
toloka_loop.register(observer)

One-line version.

toloka_loop.register(SomeObserver(pool_id='123')).do_some_preparations(...)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming