Help [Sockets]

Can i make listen sockets? or can I use setinterval to check my database?

Check the Python documentation about that.
https://docs.python.org/3/library/socket.html