Name | pydecora JSON |
Version |
1.0.1
JSON |
| download |
home_page | None |
Summary | A lightweight and modular Python decorator library |
upload_time | 2025-07-13 11:32:21 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2025 Nika Sharmazanashvili
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
|
keywords |
decorators
python
utilities
cache
retry
timeit
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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)
Raw data
{
"_id": null,
"home_page": null,
"name": "pydecora",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "decorators, python, utilities, cache, retry, timeit",
"author": null,
"author_email": "Nika Sharmazanashvili <your-email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/03/34/94ae3c75ed6f48c0964a1bde1d72daf2bfb41011454369dc1d978415757e/pydecora-1.0.1.tar.gz",
"platform": null,
"description": "# pydecora \ud83e\udde9\r\n\r\nA lightweight and modular Python decorator library that helps you write cleaner and more expressive code.\r\n\r\n## \ud83d\ude80 Features\r\n\r\n- \ud83e\udde0 `@cache`: Simple in-memory caching with optional TTL and size limit\r\n- \ud83d\udd01 `@retry`: Automatically retry failed operations with exponential backoff\r\n- \ud83d\uded1 `@suppress`: Suppress exceptions and optionally log them\r\n- \u23f1\ufe0f `@timeit`: Time execution of functions\r\n- \ud83e\uddea `@validate_args`: Enforce argument types using runtime validation\r\n\r\n## \ud83d\udce6 Installation\r\n\r\n```\r\npip install pydecora\r\n```\r\n## \ud83e\uddd1\u200d\ud83d\udcbb Usage\r\n```\r\nfrom pydecora import cache, retry\r\n\r\n@cache(ttl=60)\r\ndef slow_func(x):\r\n return x * x\r\n\r\n@retry(times=3, delay=1)\r\ndef flaky_api_call():\r\n ...\r\n```\r\n\r\n## \ud83d\udcc1 Project Structure\r\n```\r\npydecora/\r\n\u251c\u2500\u2500 pydecora/\r\n\u2502 \u251c\u2500\u2500 init.py\r\n\u2502 \u2514\u2500\u2500 decorators/\r\n\u2502 \u251c\u2500\u2500 cache.py\r\n\u2502 \u251c\u2500\u2500 retry.py\r\n\u2502 \u251c\u2500\u2500 suppress.py\r\n\u2502 \u251c\u2500\u2500 timeit.py\r\n\u2502 \u2514\u2500\u2500 validate_args.py\r\n\u251c\u2500\u2500 tests/\r\n\u2502 \u251c\u2500\u2500 test_cache.py\r\n\u2502 \u251c\u2500\u2500 test_retry.py\r\n\u2502 \u251c\u2500\u2500 test_suppress.py\r\n\u2502 \u251c\u2500\u2500 test_timeit.py\r\n\u2502 \u2514\u2500\u2500 test_validate_args.py\r\n\u251c\u2500\u2500 README.md\r\n\u251c\u2500\u2500 LICENSE\r\n\u251c\u2500\u2500 setup.py\r\n\u2514\u2500\u2500 pyproject.toml\r\n```\r\n\r\n## \ud83e\uddea Running Tests\r\n\r\n```\r\npytest pydecora/tests\r\n```\r\n\r\n## \ud83e\udd1d Contributing\r\nPull requests and ideas welcome! Please open an issue or fork and PR.\r\n\r\n## \ud83d\udcc4 License\r\nMIT \u2014 see [LICENSE](LICENSE)\r\n",
"bugtrack_url": null,
"license": "MIT License\r\n \r\n Copyright (c) 2025 Nika Sharmazanashvili\r\n \r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \u201cSoftware\u201d), to deal\r\n in the Software without restriction, including without limitation the rights \r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \r\n copies of the Software, and to permit persons to whom the Software is \r\n furnished to do so, subject to the following conditions:\r\n \r\n The above copyright notice and this permission notice shall be included in \r\n all copies or substantial portions of the Software.\r\n \r\n THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \r\n THE SOFTWARE.\r\n ",
"summary": "A lightweight and modular Python decorator library",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/nikasrmz/pydecora",
"Repository": "https://github.com/nikasrmz/pydecora"
},
"split_keywords": [
"decorators",
" python",
" utilities",
" cache",
" retry",
" timeit"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "024441d93ae9b6cdbde6198307b4c36ea6d0a419f8ede0982b756c563f5118f0",
"md5": "099ecff90a61c2ba11834b73c99e182f",
"sha256": "3b737e0f9812a31e076204aea6ceff7c8b380ba36c75e34bbf50567e44330830"
},
"downloads": -1,
"filename": "pydecora-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "099ecff90a61c2ba11834b73c99e182f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3741,
"upload_time": "2025-07-13T11:32:20",
"upload_time_iso_8601": "2025-07-13T11:32:20.826456Z",
"url": "https://files.pythonhosted.org/packages/02/44/41d93ae9b6cdbde6198307b4c36ea6d0a419f8ede0982b756c563f5118f0/pydecora-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "033494ae3c75ed6f48c0964a1bde1d72daf2bfb41011454369dc1d978415757e",
"md5": "521cb28188c5073791c2981eff1da221",
"sha256": "2948a6d307d0b2582ec02089375d965fe128d3bbfdefe47cde61296caf17a7e6"
},
"downloads": -1,
"filename": "pydecora-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "521cb28188c5073791c2981eff1da221",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4789,
"upload_time": "2025-07-13T11:32:21",
"upload_time_iso_8601": "2025-07-13T11:32:21.979273Z",
"url": "https://files.pythonhosted.org/packages/03/34/94ae3c75ed6f48c0964a1bde1d72daf2bfb41011454369dc1d978415757e/pydecora-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-13 11:32:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nikasrmz",
"github_project": "pydecora",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pydecora"
}