https://github.com/rockem/busypie
Expressive busy-waiting for Python
https://github.com/rockem/busypie
asynchronous busywait python testing
Last synced: 5 months ago
JSON representation
Expressive busy-waiting for Python
- Host: GitHub
- URL: https://github.com/rockem/busypie
- Owner: rockem
- License: apache-2.0
- Created: 2019-12-19T18:20:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T05:46:45.000Z (about 2 years ago)
- Last Synced: 2025-09-17T23:44:08.536Z (9 months ago)
- Topics: asynchronous, busywait, python, testing
- Language: Python
- Homepage:
- Size: 99.6 KB
- Stars: 24
- Watchers: 2
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Easy and expressive busy-waiting for Python
Although you typically wouldn't want to do much busy-waiting in your production code,
testing is a different matter. When testing asynchronous systems,
it's very helpful to wait for some scenario to finish its course.
**busypie** helps you perform busy waiting easily and expressively.
## Installation
```bash
pip install busypie
```
## Quickstart
Most typical usage will be in test, when we have a scenario
that requires us to wait for something to happen.
```python
from busypie import wait, SECOND
def test_create_user():
create_user_from(USER_DETAILS)
wait().at_most(2, SECOND).until(lambda: is_user_exists(USER_DETAILS))
```
## Documentation
* [Installation](https://busypie.readthedocs.io/en/latest/install.html)
* [Usage Guide](https://busypie.readthedocs.io/en/latest/index.html)
## Links
This project drew a lot of inspiration from [Awaitility](https://github.com/awaitility/awaitility).