python-debouncer-0.1.5


توضیحات

Debouncer and friends for Python
ویژگی مقدار
سیستم عامل -
نام فایل python-debouncer-0.1.5
نام python-debouncer
نسخه کتابخانه 0.1.5
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Sassan Haradji
ایمیل نویسنده sassanh@gmail.com
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/python-debouncer/
مجوز Apache-2.0
# Asyncio Debouncer ## Description This Python package provides a `debounce` decorator. It's designed for rate-limiting function calls in asynchronous Python applications. ## 📋 Requirements - Python 3.9 or later. - [python-immutable](https://github.com/sassanh/python-immutable) ## 📦 Installation The package handle in PyPI is `python-debouncer` ### Pip ```bash pip install python-debouncer ``` ### Poetry ```bash poetry add python-debouncer ``` ## 🛠 Usage Import the decorator and apply it to your async functions: ```python from debouncer import DebounceOptions, debounce @debounce(wait=.5, options=DebounceOptions(trailing=True, leading=False, time_window=3)) async def your_function(): # Function body ``` [Lodash documentation](https://lodash.com/docs/4.17.15#debounce) ### ⚠️ Important Note `maxWait` in Lodash implementation is renamed to `time_window` here, I think semantically it makes more sense. ## 🎉 Demo See `demo.py` for a usage example. ## 🤝 Contributing Contributions are welcome. Please fork the repository and open a pull request. ## 🔒 License This project is released under the Apache-2.0 License. See the [LICENSE](./LICENSE) file for more details.


نیازمندی

مقدار نام
- python-immutable<2.0.0,>=1.0.4


زبان مورد نیاز

مقدار نام
<4.0,>=3.9 Python


نحوه نصب


نصب پکیج whl python-debouncer-0.1.5:

    pip install python-debouncer-0.1.5.whl


نصب پکیج tar.gz python-debouncer-0.1.5:

    pip install python-debouncer-0.1.5.tar.gz