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
📦 Installation
The package handle in PyPI is python-debouncer
Pip
pip install python-debouncer
Poetry
poetry add python-debouncer
🛠 Usage
Import the decorator and apply it to your async functions:
from debouncer import DebounceOptions, debounce
@debounce(wait=.5, options=DebounceOptions(trailing=True, leading=False, time_window=3))
async def your_function():
# Function body
⚠️ 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 file for more details.
Metadata
Release files for python-debouncer 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_debouncer-0.1.5.tar.gz | 7.4 kB | Without provenance | Details for python_debouncer-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_debouncer-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for python_debouncer-0.1.5-py3-none-any.whl |
Total release size: 15.6 kB
Release files / python_debouncer-0.1.5.tar.gz
| Download URL | python_debouncer-0.1.5.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad4bc0229334f12cf0268a55c76ea98cb89a28f933c12fb556f92623e0c72b04
|
|
BLAKE2b-256 checksum How to use checksums |
98513c746a5a0925dce853f19a19705753d188ff3abe055ce9655dce1762dd92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / python_debouncer-0.1.5-py3-none-any.whl
| Download URL | python_debouncer-0.1.5-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d92bef943f169f93b5be79bc5c71e315f155ec7090e95c02a14c420ebdd4765d
|
|
BLAKE2b-256 checksum How to use checksums |
79066044f6ccc2b07755e8d3da794c79ac90daeaab1008470cc2484050c0366d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for python-debouncer 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.