You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, ThingClient instances are generated at runtime based on Thing Descriptions. This works, but doesn't allow type checking or autocompletion. My aspiration is to enable both of these, which probably requires code generation.
The way I see this working is that labthings_fastapi should provide code that will generate a client module based on a Thing subclass. This could be integrated into the build system of a Python package, such that the built package contains a client module - or even releases a second client package (without the hardware/server dependencies). This client module would include a ThingClient subclass with all the actions and properties of the Thing.
Dependencies of things on each other would ideally go via ThingClient objects, so the generated code should be able to be used for server-side DirectThingClients as well as HTTP based ThingClients.
The text was updated successfully, but these errors were encountered:
At present,
ThingClient
instances are generated at runtime based on Thing Descriptions. This works, but doesn't allow type checking or autocompletion. My aspiration is to enable both of these, which probably requires code generation.The way I see this working is that
labthings_fastapi
should provide code that will generate a client module based on aThing
subclass. This could be integrated into the build system of a Python package, such that the built package contains a client module - or even releases a second client package (without the hardware/server dependencies). This client module would include aThingClient
subclass with all the actions and properties of theThing
.Dependencies of things on each other would ideally go via
ThingClient
objects, so the generated code should be able to be used for server-sideDirectThingClient
s as well as HTTP basedThingClient
s.The text was updated successfully, but these errors were encountered: