activity

This module implements the base classes for Activities.

class dsplab.activity.Activity[source]

Bases: object

Any activity is the something that may be called and can provide the information about itself. To get working activity the __call__ method must be implemented.

info(as_string=None)[source]

Deprecated.

set_descr(descr)[source]

Deprecated.

class dsplab.activity.ActivityMeta(name, bases, attrs)[source]

Bases: type

Metaclass for Activity.

class_info()[source]

Return the information about activity.

Returns:Information about class of activity.
Return type:dict
class dsplab.activity.Work(descr=None, worker=None)[source]

Bases: dsplab.activity.Activity

Work is data processing that can be done in a variety of ways.

descr

Description of work

get_descr()[source]

Return description.

set_descr(text)[source]

Set description.

set_worker(act)[source]

Set worker for doing work. Worker must be callable.

class dsplab.activity.Worker[source]

Bases: dsplab.activity.Activity

Deprecated.

add_param(name, value=None)[source]

Deprecated.

dsplab.activity.get_work_from_dict(settings, params=None)[source]

Create and return Work instance described in dictionary.