Communication between database and the Python app - mini password-taking system

Asked

Viewed 114 times

0

Hello, I am learning python and I decided to do a mini project, a simple system of chips, while I thought about the subject came me some doubts and I could not find anything about.

The program would work as follows, the person takes a plug that is registered in a DB, the plug appears on the panel and the attendant, doubts are:

How the dashboard and the attendant know that the person took a chart?

I would have to create a loop thread asking DB if something was added? where can I find documentation on the subject? I don’t know if this is a good solution.

Would it be possible for DB to warn the program in any way if the table/column was changed? if yes where I can find documentation on the subject?

I thank you all.

  • What you tried so far?

  • Why does the attending have to know someone took a file? Usually when the attending goes free, he asks for a chart, so I think it makes more sense. When he asks for a chip, you go to the database and look for created and missed chips.

1 answer

0


If VC is using Django, you can use Signals. Otherwise, the same can be done with an independent ORM, such as Sqlalchemy, which has the Events as the equivalent of Django’s Signals.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.