wotpy.wot.dictionaries.interaction
Wrapper classes for dictionaries for interaction initialization that are defined in the Scripting API.
Classes
|
A dictionary wrapper class that contains data to initialize an Action. |
|
A dictionary wrapper class that contains data to initialize an Event. |
|
Base class for the three types of Interaction patterns (Properties, Actions and Events). |
|
A dictionary wrapper class that contains data to initialize a Property. |
- class wotpy.wot.dictionaries.interaction.ActionFragmentDict(*args, **kwargs)
Bases:
InteractionFragmentDictA dictionary wrapper class that contains data to initialize an Action.
- class Meta
Bases:
object- defaults = {'idempotent': False, 'safe': False}
- fields = {'@type', 'description', 'descriptions', 'forms', 'idempotent', 'input', 'output', 'safe', 'synchronous', 'title', 'titles', 'uriVariables'}
- property forms
Indicates one or more endpoints from which an interaction pattern is accessible.
- property input
Used to define the input data schema of the action.
- property output
Used to define the output data schema of the action.
- class wotpy.wot.dictionaries.interaction.EventFragmentDict(*args, **kwargs)
Bases:
InteractionFragmentDictA dictionary wrapper class that contains data to initialize an Event.
- class Meta
Bases:
object- fields = {'@type', 'cancellation', 'data', 'dataResponse', 'description', 'descriptions', 'forms', 'subscription', 'title', 'titles', 'uriVariables'}
- property cancellation
Defines any data that needs to be passed to cancel a subscription, e.g., a specific message to remove a Webhook.
- property data
Defines the data schema of the Event instance messages pushed by the Thing.
- property data_response
Defines the data schema of the Event response messages sent by the consumer in a response to a data message.
- property forms
Indicates one or more endpoints from which an interaction pattern is accessible.
- property subscription
Defines data that needs to be passed upon subscription, e.g., filters or message format for setting up Webhooks.
- class wotpy.wot.dictionaries.interaction.InteractionFragmentDict(*args, **kwargs)
Bases:
WotBaseDictBase class for the three types of Interaction patterns (Properties, Actions and Events).
- class Meta
Bases:
object- fields = {'@type', 'description', 'descriptions', 'forms', 'title', 'titles', 'uriVariables'}
- property forms
Indicates one or more endpoints from which an interaction pattern is accessible.
- property uri_variables
Define URI template variables as collection based on DataSchema declarations.
- class wotpy.wot.dictionaries.interaction.PropertyFragmentDict(*args, **kwargs)
Bases:
InteractionFragmentDictA dictionary wrapper class that contains data to initialize a Property.
- class Meta
Bases:
object- fields = {'@type', 'description', 'descriptions', 'forms', 'observable', 'title', 'titles', 'uriVariables'}
- property data_schema
The DataSchema that represents the schema of this property.
- property forms
Indicates one or more endpoints from which an interaction pattern is accessible.
- to_dict()
Returns the pure dict (JSON-serializable) representation of this WoT dictionary.
- property writable
Returns True if this Property is writable.