About 951,000 results
Open links in new tab
  1. How to add polling interval for a GET request in python

    May 23, 2021 · if requests.get(url=url, headers=headers).json().get('status') != 'success': logging.info("Polling started.......") logging.info("Waiting.......") return False. return True. try: …

  2. Python HTTP Requests with Long Polling: A Comprehensive Guide

    Mar 7, 2025 · This blog post will delve into how to use Python to send HTTP requests with long polling, covering fundamental concepts, usage methods, common practices, and best …

  3. How to Use Python for HTTP Requests with Long Polling

    Nov 21, 2024 · By following these guidelines and utilizing the provided code examples, you can effectively implement long polling in your Python applications while leveraging cutting-edge …

  4. Python Basics: Understanding Long Polling - LinkedIn

    May 19, 2023 · To implement long polling in Python, you'll need a web framework such as Flask or Django. Let's explore a basic example using Flask: 1️⃣ First, import the necessary …

  5. Using the Polling module in Python | by JJ | Medium

    May 23, 2015 · With polling, you can simply pass a function, a step (time to wait between calls), and a timeout. By default, your function will be called until: You can set other custom options …

  6. Is there a way to extract the http response using python polling ...

    Oct 29, 2019 · You can assing poll() result to variable and it will have value returned by lambda result = polling2.poll(lambda: requests.get('http://google.com').status_code == 200, step=60, …

  7. ExamplesPolling2 0.5.0 documentation - Read the Docs

    from polling2 import poll # Setting timeout to zero is equivalent to setting poll_forever=True. # This call will also poll the target forever. poll(target=lambda: False, step=1, timeout=0) Perhaps …

  8. How To Use Python HTTP Requests For Long Polling: A Step-By …

    Mar 1, 2025 · Long polling is a technique that ensures the server pushes updates to the client as soon as they're available. This guide will walk you through the process of implementing long …

  9. Better way to write a polling function in python - Stack Overflow

    Jan 18, 2017 · There is a library in python Polling (https://pypi.python.org/pypi/polling/0.3.0) You can use this. poll(lambda: reg_result=='REGISTERED', timeout=120, step=1) print "Value was …

  10. Effective Long Polling in Python: How to Send HTTP Requests

    Jan 29, 2025 · Long polling is a technique that allows a client to hold a request open until new data is available, reducing unnecessary requests compared to standard polling. How do I …

  11. Some results have been removed
Refresh