wotpy.wot.thing
Class that represents a Thing.
Classes
|
An abstraction of a physical or virtual entity whose metadata and interfaces are described by a WoT Thing Description. |
- class wotpy.wot.thing.Thing(thing_fragment=None, **kwargs)
Bases:
objectAn abstraction of a physical or virtual entity whose metadata and interfaces are described by a WoT Thing Description.
- THING_FRAGMENT_WRITABLE_FIELDS = {'@context', '@type', 'actions', 'base', 'created', 'description', 'descriptions', 'events', 'forms', 'id', 'links', 'modified', 'profile', 'properties', 'schemaDefinitions', 'security', 'securityDefinitions', 'support', 'title', 'titles', 'uriVariables', 'version'}
- property actions
Actions interactions.
- add_interaction(interaction)
Add a new Interaction.
- property events
Events interactions.
- find_interaction(name)
Finds an existing Interaction by name. The name argument may be the original name or the URL-safe version.
- property id
Thing ID.
- property interactions
Sequence of interactions linked to this thing.
- property properties
Properties interactions.
- remove_interaction(name)
Removes an existing Interaction by name. The name argument may be the original name or the URL-safe version.
- property security
List of supported security schemes.
- property security_definitions
Security configuration for each of the supported protocols.
- property thing_fragment
The ThingFragment dictionary of this Thing.
- property title
Thing title.
- property url_name
Returns the URL-safe name of this Thing.