wotpy.wot.thing¶
Class that represents a Thing.
Classes
Thing ([thing_fragment]) |
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:
object
An abstraction of a physical or virtual entity whose metadata and interfaces are described by a WoT Thing Description.
-
THING_FRAGMENT_WRITABLE_FIELDS
= {'base', 'created', 'description', 'lastModified', 'links', 'security', 'support', 'title', 'version'}¶
-
actions
¶ Actions interactions.
-
add_interaction
(interaction)¶ Add a new Interaction.
-
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.
-
id
¶ Thing ID.
-
interactions
¶ Sequence of interactions linked to this thing.
-
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.
-
thing_fragment
¶ The ThingFragment dictionary of this Thing.
-
title
¶ Thing title.
-
url_name
¶ Returns the URL-safe name of this Thing. The URL name of a Thing is always unique and stable as long as the ID is unique.
-
uuid
¶ Thing UUID in hex string format (e.g. a5220c5f-6bcb-4675-9c67-a2b1adc280b7). This value is deterministic and derived from the Thing ID. It may be of use when URL-unsafe chars are not acceptable.
-