wotpy.wot.consumed.interaction_map

Classes that represent Interaction instances accessed on a ConsumedThing.

Classes

ConsumedThingAction(consumed_thing, name) The ThingAction interface implementation for ConsumedThing objects.
ConsumedThingActionDict(*args, **kwargs) A dictionary that provides lazy access to the objects that implement the ThingAction interface for each action in a given ConsumedThing.
ConsumedThingEvent(consumed_thing, name) The ThingEvent interface implementation for ConsumedThing objects.
ConsumedThingEventDict(*args, **kwargs) A dictionary that provides lazy access to the objects that implement the ThingEvent interface for each event in a given ConsumedThing.
ConsumedThingInteractionDict(*args, **kwargs) A dictionary that provides lazy access to the objects that implement the Interaction interface for each interaction in a given ConsumedThing.
ConsumedThingProperty(consumed_thing, name) The ThingProperty interface implementation for ConsumedThing objects.
ConsumedThingPropertyDict(*args, **kwargs) A dictionary that provides lazy access to the objects that implement the ThingProperty interface for each property in a given ConsumedThing.
class wotpy.wot.consumed.interaction_map.ConsumedThingAction(consumed_thing, name)

Bases: object

The ThingAction interface implementation for ConsumedThing objects.

invoke(*args, **kwargs)

The invoke() method when invoked, starts the Action interaction with the input value provided by the inputValue argument.

class wotpy.wot.consumed.interaction_map.ConsumedThingActionDict(*args, **kwargs)

Bases: wotpy.wot.consumed.interaction_map.ConsumedThingInteractionDict

A dictionary that provides lazy access to the objects that implement the ThingAction interface for each action in a given ConsumedThing.

interaction_dict

Returns an interactions dict by name. The dict values are the raw dict interactions as contained in a TD document.

thing_interaction_class

Returns the class that implements the Interaction interface for this type of interaction.

class wotpy.wot.consumed.interaction_map.ConsumedThingEvent(consumed_thing, name)

Bases: object

The ThingEvent interface implementation for ConsumedThing objects.

subscribe(*args, **kwargs)

Subscribe to an stream of emissions of this event.

class wotpy.wot.consumed.interaction_map.ConsumedThingEventDict(*args, **kwargs)

Bases: wotpy.wot.consumed.interaction_map.ConsumedThingInteractionDict

A dictionary that provides lazy access to the objects that implement the ThingEvent interface for each event in a given ConsumedThing.

interaction_dict

Returns an interactions dict by name. The dict values are the raw dict interactions as contained in a TD document.

thing_interaction_class

Returns the class that implements the Interaction interface for this type of interaction.

class wotpy.wot.consumed.interaction_map.ConsumedThingInteractionDict(*args, **kwargs)

Bases: collections.UserDict

A dictionary that provides lazy access to the objects that implement the Interaction interface for each interaction in a given ConsumedThing.

interaction_dict

Returns an interactions dict by name. The dict values are the raw dict interactions as contained in a TD document.

thing_interaction_class

Returns the class that implements the Interaction interface for this type of interaction.

class wotpy.wot.consumed.interaction_map.ConsumedThingProperty(consumed_thing, name)

Bases: object

The ThingProperty interface implementation for ConsumedThing objects.

read(timeout=None, client_kwargs=None)

The read() method will fetch the value of the Property. A coroutine that yields the value or raises an error.

subscribe(*args, **kwargs)

Subscribe to an stream of events emitted when the property value changes.

write(value, timeout=None, client_kwargs=None)

The write() method will attempt to set the value of the Property specified in the value argument whose type SHOULD match the one specified by the type property. A coroutine that yields on success or raises an error.

class wotpy.wot.consumed.interaction_map.ConsumedThingPropertyDict(*args, **kwargs)

Bases: wotpy.wot.consumed.interaction_map.ConsumedThingInteractionDict

A dictionary that provides lazy access to the objects that implement the ThingProperty interface for each property in a given ConsumedThing.

interaction_dict

Returns an interactions dict by name. The dict values are the raw dict interactions as contained in a TD document.

thing_interaction_class

Returns the class that implements the Interaction interface for this type of interaction.