Skip to main content

Waiter

Project description

air-waiter

Call a callable until the expected result. Raises TimeoutError if limit is reached. Waiter can be limited by timeout or/and by maximal calls count.

Install

# With uv
uv add air-waiter

# With poetry
poetry add air-waiter

# With pip
pip install air-waiter

Usage

Wait untill the action returns the expected value in timeout

Wait(action, timeout=10, interval=0.1).until(lambda x: check_action(x))

Wait untill the action returns the expected value with limited attempts

Wait(action, timeout=0, max_attempts=5, interval=0.1).until(lambda x: check_action(x))

Wait untill the action returns the expected value, doubling the interval after each attempt

Wait(action, timeout=10, is_exponential=True, interval=0.01).until(lambda x: check_action(x))

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

air_waiter-1.0.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

air_waiter-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file air_waiter-1.0.0.tar.gz.

File metadata

  • Download URL: air_waiter-1.0.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for air_waiter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 99ec08c97e82554315a1a7c8da644a25a2392ad08deeb162ff44016c11aa1d80
MD5 7387dc2c10006fa04a74819c006f1b3c
BLAKE2b-256 3d5cdc122585614e3b5efdc8f9d0e5d0d6cbd22fa4ad0e5e0908ffd2e161a87f

See more details on using hashes here.

Provenance

The following attestation bundles were made for air_waiter-1.0.0.tar.gz:

Publisher: publish.yml on airreality/air-waiter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file air_waiter-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: air_waiter-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for air_waiter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5eabdad3c0639bb9621f4f4dcb5b5264f9287f0c43a2c70461433982a2120716
MD5 7f8f5cd919cc48071215d631d5d07dbc
BLAKE2b-256 23763973692e2c61015e2aa5753bcffeea095efbe9b5b13ed44b98ef68f12089

See more details on using hashes here.

Provenance

The following attestation bundles were made for air_waiter-1.0.0-py3-none-any.whl:

Publisher: publish.yml on airreality/air-waiter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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