Answer the question
In order to leave comments, you need to log in
Working with hardware via the web in python?
There is a small console application that can exclusively query equipment on the com port. I want to attach a web face to it on flask. I tried to throw data from the hardware onto it, everything is fine in the request mode from one workplace (each request to the page makes a direct request to the device on the port). If you request data from different workplaces, then problems naturally arise, since each open page starts to break on the port. The question is what algorithm or intermediate structure to use (also in the future, graphs are needed, a database may be needed)?
Answer the question
In order to leave comments, you need to log in
If graphics are in the plans, then you can hardly do without a database.
Option:
- the application runs periodically (as convenient - scheduler, service, etc.) and writes data to the database
- WEB interface displays data not from the application but from the database
- if necessary, make a button on which you hang up a request for up-to-date data (sometimes it can come in handy).
each page request makes a direct request to the device on the port
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question