Metadata-Version: 2.4
Name: pydecora
Version: 1.1.0
Summary: A lightweight and modular Python decorator library
Author-email: Nika Sharmazanashvili <nikasharmaza@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/nikasrmz/pydecora
Project-URL: Repository, https://github.com/nikasrmz/pydecora
Keywords: decorators,python,utilities,cache,retry,timeit
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# pydecora 🧩

A lightweight and modular Python decorator library that helps you write cleaner and more expressive code.

## 🚀 Features

- 🧠 `@cache`: Simple in-memory caching with optional TTL and size limit
- 🔁 `@retry`: Automatically retry failed operations with exponential backoff
- 🛑 `@suppress`: Suppress exceptions and optionally log them
- ⏱️ `@timeit`: Time execution of functions
- 🧪 `@validate_args`: Enforce argument types using runtime validation

## 📦 Installation

```
pip install pydecora
```
## 🧑‍💻 Usage
```
from pydecora import cache, retry

@cache(ttl=60)
def slow_func(x):
    return x * x

@retry(times=3, delay=1)
def flaky_api_call():
    ...
```

## 📁 Project Structure
```
pydecora/
├── pydecora/
│ ├── init.py
│ └── decorators/
│ ├── cache.py
│ ├── retry.py
│ ├── suppress.py
│ ├── timeit.py
│ └── validate_args.py
├── tests/
│ ├── test_cache.py
│ ├── test_retry.py
│ ├── test_suppress.py
│ ├── test_timeit.py
│ └── test_validate_args.py
├── README.md
├── LICENSE
├── setup.py
└── pyproject.toml
```

## 🧪 Running Tests

```
pytest pydecora/tests
```

## 🤝 Contributing
Pull requests and ideas welcome! Please open an issue or fork and PR.

## 📄 License
MIT — see [LICENSE](LICENSE)
