agmangas / wot-py Goto Github PK
View Code? Open in Web Editor NEWwotpy is an experimental asynchronous implementation of a W3C Web of Things runtime
License: MIT License
wotpy is an experimental asynchronous implementation of a W3C Web of Things runtime
License: MIT License
According to the Thing Description specification it is possible to create a set of security definitions under securityDefinitions
field and refer to them in the security
field. However, this kind of TD is not currently supported by wot-py
, although it is absolutely valid TD.
Hello.
I'm taking a look into your W3C Web of Things implementation in Python.
Is it with the current state of the implementation possible to create a Thing Description from various Thing Models?
I've found an issue while working on #11.
Any URL with a trailing slash leads to 404 Not Found.
However, http://127.0.0.1:9090/my-thing
and http://127.0.0.1:9090/my-thing/
must be the same URL.
This can lead to incompatibility issues with node-wot as well.
As Python 2.7 is now EOL, it should be considered to drop both the support and the testing in the CI for this version. This should make the code easier to maintain and further develop as dependencies like six
could be removed.
The title
field is ignored in the generated Thing Description.
node-wot approach:
Create Thing and expose it within the following URL:
scheme://ip-address:port/thing-title
, e.g.
http://127.0.0.1:8080/Smart-Coffee-Machine
which looks pretty concise.
wot-py approach:
Create Thing and expose it within the following URL:
scheme://hostname.domain:port/thing-id+uuid(derived from TD)
, e.g.
http://my-hostname.my-domain:9090/urn-dev-wot-example-coffee-machine-97e83de1-f5c9-a4a0-23b6-be918d3a22ca
which is imho too long and quite overwhelmed.
node-wot approach:
The body of a request is already considered as a new value when writing to a property. It is also possible to wrap it around {"value": ...value...}
and node-wot will unwrap that. But the first way is preferred.
The body of a request is already considered as an input when invoking an action. It is not possible to wrap it around {"input": ...input...}
.
wot-py approach:
It is mandatory to wrap property values with {"value": ...value...}
and action inputs with {"input": ...input...}
.
node-wot approach:
thing.writeProperty
.wot-py approach:
According to the Thing Description specification, it should be possible to read/write properties and invoke actions using uriVariables but, currently, they are ignored in both affordances.
According to the Thing Description specification, the type of the op
field is a string or an array of strings.
However, currently, wot-py considers it as a string only.
node-wot:
The change event for an observable property is emitted only if the new value differs from the previous one.
wot-py:
The change event for an observable property is always emitted regardless of the value.
I suggest using this issue to keep track of all the work being done to make the library compliant with the W3C WoT specifications.
@agmangas Could you please create a list of current blocking issues so that I can start working on some of them? (And other people or you might take the others)
We can link all the blockers and todos here and finally start working on bringing the library up to the specs! ๐
node-wot approach:
Direct result of an action is returned when invoking an action.
wot-py approach:
Invocation id is returned when invoking an action. Direct result of an action should be fetched from a separate endpoint.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.