wotpy.protocols.coap.resources.property

CoAP resources to deal with Property interactions.

Functions

get_thing_property(server, request) Takes a CoAP request and returns the Thing Property identified by the request arguments.

Classes

PropertyResource(server) CoAP resource that implements the Property read, write and observe verbs.
class wotpy.protocols.coap.resources.property.PropertyResource(server)

Bases: aiocoap.resource.Resource

CoAP resource that implements the Property read, write and observe verbs.

add_observation(request, server_observation)

Method that decides whether to add a new observer. A new observer is added for each GET request.

render_get(request)

Returns a CoAP response with the current property value.

render_put(request)

Updates the property with the value retrieved from the CoAP request payload.

wotpy.protocols.coap.resources.property.get_thing_property(server, request)

Takes a CoAP request and returns the Thing Property identified by the request arguments.