Python getting/posting data in threads
After all I have created a table in my db that is countinuously updated via trigger-function functionality. On python side I have done Threads that call to this table asynchronously, get data and do their stuff.
Perhaps, this is not the ideal solution, but it works and covers my current needs.
I have implemented python code that is listening my db and continuously stores data in pandas DataFrame (inserts new rows and updates old as infinite loop). The data comes to python as it appears in db (updates come on average every 1-5 seconds). 
The second part of my python code should do some stuff with this DataFrame. So what I want to do is to split my code into separate threads. 
The first thread will store data in DataFrame and the other thread (or more than one) will use the DataFrame to do some stuff and return results via plots, variables and so on. 
I have done some reaserch on threading, but I have not found the solution yet. Any help on this issue and/or example code is highly appreciated.