wait-for-it-to


Namewait-for-it-to JSON
Version 0.0.21 PyPI version JSON
download
home_pagehttps://github.com/studioj/wait_for_it/
SummaryHelper library which waits
upload_time2023-05-19 23:48:05
maintainer
docs_urlNone
authorJef Neefs
requires_python>=3.8
licenseMIT
keywords wait time no_sleep
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### 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&utm_medium=referral&utm_content=studioj/wait_for_it&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>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/studioj/wait_for_it/",
    "name": "wait-for-it-to",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "wait,time,no_sleep",
    "author": "Jef Neefs",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/3c/ed/3821371cc1941a4e626e3deebca76b3c62aeb959bb0c4c1f0b560901a0e9/wait_for_it_to-0.0.21.tar.gz",
    "platform": "unix",
    "description": "### waitforit\n\n| What | Badges |\n|------|--------|\n| 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) |\n| 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) |\n| PyPI | ![PyPI - Downloads](https://img.shields.io/pypi/dw/wait_for_it_to?style=flat) |\n\nThis is a library for letting your python code wait for a certain action to complete\n\nshort example\n\nGiven these functions\n```python\nimport wait_for_it_to\ndef foo():\n  return True\n\ndef bar(param):\n  x = param\n  return False\n```\n\nThis would immediatly return\n```python\n>> wait_for_it_to.be_true(foo)\n>>\n```\n\nYou can also pass parameters as a list\n```python\n>> wait_for_it_to.be_true(bar, args=[1])\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\n  File \"..\\wait_for_it\\wait_for_it_to\\__init__.py\", line 27, in be_true\n    raise TimeoutError(msg)\nTimeoutError: expected something that evaluates to True, but got False instead\n```\n\nYou can also pass a timeout value in seconds\n```python\n>> wait_for_it_to.be_true(foo, timeout=5)\n```\nQuite similar you have the functionality\n```python\n>> wait_for_it_to.be_false(bar, timeout=5, args[1])\n>> wait_for_it_to.equal(bar, False, timeout=5, args[1])\n>> wait_for_it_to.not_raise_an_exception(bar, timeout=5, RuntimeError)\n```\n### Version History\n\n<https://github.com/studioj/wait_for_it/releases>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Helper library which waits",
    "version": "0.0.21",
    "project_urls": {
        "Homepage": "https://github.com/studioj/wait_for_it/"
    },
    "split_keywords": [
        "wait",
        "time",
        "no_sleep"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcede151673d53c420a2a15e974ce3c80f06a6637a3ef505689f1b09419eb7be",
                "md5": "a3d09feeeb3890ebbae839926152fd1d",
                "sha256": "4455985af1743b6fa3649bb9119a9e53bb4972160d629bbbdca529db883be747"
            },
            "downloads": -1,
            "filename": "wait_for_it_to-0.0.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a3d09feeeb3890ebbae839926152fd1d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15993,
            "upload_time": "2023-05-19T23:48:02",
            "upload_time_iso_8601": "2023-05-19T23:48:02.803494Z",
            "url": "https://files.pythonhosted.org/packages/fc/ed/e151673d53c420a2a15e974ce3c80f06a6637a3ef505689f1b09419eb7be/wait_for_it_to-0.0.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ced3821371cc1941a4e626e3deebca76b3c62aeb959bb0c4c1f0b560901a0e9",
                "md5": "8b7e3b9c8c4794bd84cd7b88c60ee818",
                "sha256": "2449c665da0df0a136f6a875dff110cf5feac3cdac51c69a930fe217eec921b3"
            },
            "downloads": -1,
            "filename": "wait_for_it_to-0.0.21.tar.gz",
            "has_sig": false,
            "md5_digest": "8b7e3b9c8c4794bd84cd7b88c60ee818",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 26724,
            "upload_time": "2023-05-19T23:48:05",
            "upload_time_iso_8601": "2023-05-19T23:48:05.134565Z",
            "url": "https://files.pythonhosted.org/packages/3c/ed/3821371cc1941a4e626e3deebca76b3c62aeb959bb0c4c1f0b560901a0e9/wait_for_it_to-0.0.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-19 23:48:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "studioj",
    "github_project": "wait_for_it",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "wait-for-it-to"
}
        
Elapsed time: 0.07892s