Skip to main content

wait function used to wait event happens

Project description

changelist

  • 1.1.0, add wait_for
  • 1.0.0, first release

feedback

how to install

pip install wait-util

known issues

None

how to use

  1. install package

    run pip install wait-util to install wait package

  2. use wait_until_change/wait_until_no_change

    from wait import wait_until_change, wait_until_no_change
    
    def demo():
      return 1
    
    wait_until_change(demo, interval=1, timeout=5)
    
    wait_until_no_change(demo, interval=1, timeout=5)
    
  3. use wait_for_true/wait_for_false

    from wait import wait_for_true, wait_for_false
    
    def demo():
      return True
    
    wait_for_true(demo, interval=1, timeout=5)
    
    wait_for_false(demo, interval=1, timeout=5)
    
  4. use wait_for from wait import wait_for

    def func(): import random return random.randint(0, 1)

    wait_for(func, 0)

    
    

how to contribute

  1. visit https://github.com/dvdface/waitutil
  2. submit your contribute

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wait-util-1.1.0.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file wait-util-1.1.0.tar.gz.

File metadata

  • Download URL: wait-util-1.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for wait-util-1.1.0.tar.gz
Algorithm Hash digest
SHA256 58c79045c6582d3b6a4d055547c2e206dc7052c853714912341b8de76833d7fb
MD5 68245b67523aca0cf668e62be007d760
BLAKE2b-256 37a4dfe69fed2ea4ede43407bc4fa4033fe96f387e1842be309387b38c13281a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page