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: ObservableResource

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

async add_observation(request, server_observation)

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

async render_get(request)

Returns a CoAP response with the current property value.

async render_put(request)

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

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

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