wotpy.protocols.http.handlers.property

Request handler for Property interactions.

Classes

PropertyObserverHandler(application, ...)

Handler for Property subscription requests.

PropertyReadWriteHandler(application, ...)

Handler for Property get/set requests.

class wotpy.protocols.http.handlers.property.PropertyObserverHandler(application: Application, request: HTTPServerRequest, **kwargs: Any)

Bases: RequestHandler

Handler for Property subscription requests.

async get(thing_name, name)

Subscribes to Property updates and waits for the next event (HTTP long-polling pattern). Returns the updated value and destroys the subscription.

initialize(http_server)
on_finish()

Destroys the subscription to the observable when the request finishes.

class wotpy.protocols.http.handlers.property.PropertyReadWriteHandler(application: Application, request: HTTPServerRequest, **kwargs: Any)

Bases: RequestHandler

Handler for Property get/set requests.

async get(thing_name, name)

Reads and returns the Property value.

initialize(http_server)
async put(thing_name, name)

Updates the Property value.