Software and instructions for setting up and running a self-driving lab (autonomous experimentation) demo using dimmable RGB LEDs, an 8-channel spectrophotometer, a microcontroller, and an adaptive design algorithm, as well as extensions to liquid- and solid-based color matching demos.
Have you looked at pydantic for this kind of thing? Its pretty nice, clear to work with, and stitches into API's very cleanly. Example for validating job submission to our API:
For SDLs with multiple steps (i.e. multiple pieces of hardware that require separate communication), I lean toward the idea of the user communicating with a central processor as a "firewall" of sorts (e.g., physical hardware or cloud-based server) rather than having the user directly communicate with the individual pieces of hardware. Something where the scope of users that can change code on the physical hardware, server, etc. is narrower than the scope of users that can send requests to it.
I.e., a way to expose a controlled instance of the API pinned to a specific package version via HTTP requests, for free.
From https://github.com/sparks-baird/self-driving-lab-demo/discussions/127#discussioncomment-4199244 by @rekumar:
This would be at the application side (perhaps in the observation function).
Once pydantic is implemented in the codebase, I'd like to figure out a way to put a virtual- or hardware-based "firewall" in-between the user requesting the experiment and the device(s) carrying out the commands, in line with https://github.com/sparks-baird/self-driving-lab-demo/discussions/127#discussioncomment-4200086:
I.e., a way to expose a controlled instance of the API pinned to a specific package version via HTTP requests, for free.
Google search: host python package api for free
Vercel