The CC100 is already running Node-RED (running under Docker) where a lot of data is collected by sensors.
Now I want to run a Phyton script on the CC100 (ideally also with Docker), which creates a REST API. This should make it possible to exchange data with external applications.
Does anyone here have experience with this?
Is there perhaps a port (image) like Node-RED, in which I can write my script?
I am grateful for any contribution!
try to find some Flask (python framework) REST API Tutorial, I did this once this way
thank’s for your answer.
I have already looked at some tutorials, but they always run docker on Windows and not on the CC100.
I am looking for an easy way to run the Python script on the CC100. One idea from me is, to would be to trigger it via the Node-RED application!
Besides, I would like to realize it with FastAPI instead of using Flask or Django.
On the FastAPI docs you can find how to dockerize it: FastAPI in Containers - Docker - FastAPI
You can create some simple API using “http request” and “http response” in NodeRED:
first example which I found: Build REST API using Flow Based Programming (Node-Red) | by ankur kushwaha | Medium