Communication between database and app in Python - mini system to get password

0

Hello, I'm learning python and I decided to do a mini project, a simple system of chips, while I thought about it I came across some doubts and could not find almost anything about it.

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

How does the panel and the attendant know that the person has taken a token?

I would have to create a looping thread by asking the DB if something was added? Where can I find documentation on the subject? I do not know if this is a good solution.

Would the DB have somehow warn the program if the table / column has changed? if so where can I find documentation on the subject?

Thank you all.

    
asked by anonymous 09.07.2015 / 21:26

1 answer

0

If you're using Django, you can use Signals . Otherwise, the same can be done with an independent ORM, such as SQLAlchemy, which has Events as the equivalent of Django's Signals.

    
12.08.2015 / 04:16