Metadata-Version: 2.1
Name: pycooldown
Version: 0.1.0b11
Summary: A lightning fast cooldown/ratelimit implementation.
Home-page: https://github.com/TrigonDev/pycooldown
License: MIT
Keywords: mypyc,ratelimit,cooldown
Author: Circuit
Author-email: circuitsacul@icloud.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
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/circuitsacul/pycooldown/wiki) | [Support](https://discord.gg/dGAzZDaTS9)

A lightning-fast cooldown/ratelimit implementation.

## 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.")
```

