Metadata-Version: 2.1
Name: pycooldown
Version: 0.1.0b4
Summary: A lightning fast cooldown/ratelimit implementation.
Home-page: https://github.com/TrigonDev/pycooldown
License: MIT
Keywords: cython,ratelimit,cooldown
Author: Circuit
Author-email: circuitsacul@icloud.com
Requires-Python: >=3.8,<3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: mypy-extensions (>=0.4.3,<0.5.0)
Project-URL: Repository, https://github.com/TrigonDev/pycooldown
Description-Content-Type: text/markdown

# pycooldown
[![pypi](https://github.com/TrigonDev/apgorm/actions/workflows/pypi.yml/badge.svg)](https://pypi.org/project/pycooldown)

[Documentation](https://github.com/trigondev/pycooldown/wiki) | [CONTRIBUTING.md](https://github.com/trigondev/.github/tree/main/CONTRIBUTING.md)

A lightning-fast cooldown/ratelimit implementation.

If you need support, you can contact me `CircuitSacul#3397` after joining [this server](https://discord.gg/dGAzZDaTS9). I don't accept friend requests.

## Example Usage
```py
from pycooldown import FixedCooldown


cooldown = FixedCooldown(period=10, capacity=5)


def handle_event(sender):
    retry_after = cooldown.update_ratelimit(sender)
    if retry_after is None:
        print("Event succeeded!")
    else:
        print(f"Too many events from {sender}. Retry in {retry_after} seconds.")
```

