Unlike HTTP, with WebSockets, you don't need to continuously make requests when you want specific information. WebSockets maintain a network connection for you (if done right) and listen for changes . You may view the official documentation here.
from web3 import Web3
websocket_url='wss://api.chainup.net/ws/polygon/mainnet/<YOUR_API_KEY>'
w3 = Web3(Web3.HTTPProvider(websocket_url))
# You can check if the connection is established using isConnected function.
w3.isConnected()
# Output: True