semvec/pypi-packages huggingface dataset:
wait-for-it-to 0.0.21
Helper library which waits
License: MIT
Requires Python: >=3.8
Keywords: wait,time,no_sleep

### waitforit

| What | Badges |
|------|--------|
| Code and Test Quality | [![codecov](https://codecov.io/gh/studioj/wait_for_it/branch/master/graph/badge.svg)](https://codecov.io/gh/studioj/wait_for_it) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d3292d34dbfd4fae8e2427da3bb77198)](https://www.codacy.com/manual/studioj/wait_for_it?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=studioj/wait_for_it&amp;utm_campaign=Badge_Grade) [![CodeFactor](https://www.codefactor.io/repository/github/studioj/wait_for_it/badge)](https://www.codefactor.io/repository/github/studioj/wait_for_it) |
| SonarQube | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=studioj_wait_for_it&metric=alert_status)](https://sonarcloud.io/dashboard?id=studioj_wait_for_it) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=studioj_wait_for_it&metric=code_smells)](https://sonarcloud.io/dashboard?id=studioj_wait_for_it) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=studioj_wait_for_it&metric=bugs)](https://sonarcloud.io/dashboard?id=studioj_wait_for_it) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=studioj_wait_for_it&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=studioj_wait_for_it) |
| PyPI | ![PyPI - Downloads](https://img.shields.io/pypi/dw/wait_for_it_to?style=flat) |

This is a library for letting your python code wait for a certain action to complete

short example

Given these functions
```python
import wait_for_it_to
def foo():
  return True

def bar(param):
  x = param
  return False
```

This would immediatly return
```python
>> wait_for_it_to.be_true(foo)
>>
```

You can also pass parameters as a list
```python
>> wait_for_it_to.be_true(bar, args=[1])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "..\wait_for_it\wait_for_it_to\__init__.py", line 27, in be_true
    raise TimeoutError(msg)
TimeoutError: expected something that evaluates to True, but got False instead
```

You can also pass a timeout value in seconds
```python
>> wait_for_it_to.be_true(foo, timeout=5)
```
Quite similar you have the functionality
```python
>> wait_for_it_to.be_false(bar, timeout=5, args[1])
>> wait_for_it_to.equal(bar, False, timeout=5, args[1])
>> wait_for_it_to.not_raise_an_exception(bar, timeout=5, RuntimeError)
```
### Version History

<https://github.com/studioj/wait_for_it/releases>
ModML 0.1.1
ModML Python
License: MIT

<!-- These are examples of badges you might want to add to your README:
     please update the URLs accordingly

[![Built Status](https://api.cirrus-ci.com/github/<USER>/ModMLPy.svg?branch=main)](https://cirrus-ci.com/github/<USER>/ModMLPy)
[![ReadTheDocs](https://readthedocs.org/projects/ModMLPy/badge/?version=latest)](https://ModMLPy.readthedocs.io/en/stable/)
[![Coveralls](https://img.shields.io/coveralls/github/<USER>/ModMLPy/main.svg)](https://coveralls.io/r/<USER>/ModMLPy)
[![PyPI-Server](https://img.shields.io/pypi/v/ModMLPy.svg)](https://pypi.org/project/ModMLPy/)
[![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/ModMLPy.svg)](https://anaconda.org/conda-forge/ModMLPy)
[![Monthly Downloads](https://pepy.tech/badge/ModMLPy/month)](https://pepy.tech/project/ModMLPy)
[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter)](https://twitter.com/ModMLPy)
-->

[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)

# ModMLPy

> ModML Python

A longer description of your project goes here...


<!-- pyscaffold-notes -->

## Note

This project has been set up using PyScaffold 4.4.1. For details and usage
information on PyScaffold see https://pyscaffold.org/.