Obervations: installing webthing, updating my webthing properties

In webthing readme.rst it says “pip install webthing”. This didn’t work for me, my webthing still couldn’t see the module. I had to do “pip3 install module”. I don’t know why - I’m a unix noob. Maybe it’s because I was developing in the pi directory and not the gateway (I had installed Raspbian and then built the Gateway because I wanted the desktop available).
I had a LOT of trouble trying to get my python app to update the property in my webthing. Finally I had success using the requests module with…
data={“level”: distance}
r = requests.put(“http://10.0.0.60:8888/properties/level”, json=data)
It would have been nice if there had been a simple and complete example to follow.
P.S. my python app measures the volume in a water tank using “ARCELI DC 5V Module de capteur transducteur de Mesure de Distance à ultrasons étanche”.
Richard.

I use this helper function to update the value of a property: https://github.com/freaktechnik/WebOfTXT/blob/master/main.py#L687-L694

self.thing is an instance of a Webthing.

I think this may now be supported in the library directly (or maybe that’s just for adapters).