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