aiodecorators


Nameaiodecorators JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttp://github.com/dflupu/aiodecorators
SummaryFunction decorators based on asyncio synchronization primitives
upload_time2022-12-23 14:24:17
maintainer
docs_urlNone
authorDaniel Lupu
requires_python
licenseMIT
keywords asyncio aio lock semaphore boundedsemaphore decorator decorators synchronization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # aiodecorators
Function decorators based on asyncio Lock, Semaphore and BoundedSemaphore

## Install
`pip3 install aiodecorators`

## Usage

[asyncio.Lock](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock)
```
from aiodecorators import Lock

@Lock()
async def f():
    pass
```

[asyncio.Semaphore](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Semaphore)
```
from aiodecorators import Semaphore

@Semaphore(n)
async def f():
    pass
```
[asyncio.BoundedSemaphore](https://docs.python.org/3/library/asyncio-sync.html#asyncio.BoundedSemaphore)
```
from aiodecorators import BoundedSemaphore

@BoundedSemaphore(n)
async def f():
    pass
```

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/dflupu/aiodecorators",
    "name": "aiodecorators",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "asyncio aio lock semaphore boundedsemaphore decorator decorators synchronization",
    "author": "Daniel Lupu",
    "author_email": "dflupu@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d0/66/283cf17c0de8932b920d22b3ffeee4bf74d80bc2e44b4705bd1c0a3a2bc4/aiodecorators-0.2.1.tar.gz",
    "platform": null,
    "description": "# aiodecorators\nFunction decorators based on asyncio Lock, Semaphore and BoundedSemaphore\n\n## Install\n`pip3 install aiodecorators`\n\n## Usage\n\n[asyncio.Lock](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock)\n```\nfrom aiodecorators import Lock\n\n@Lock()\nasync def f():\n    pass\n```\n\n[asyncio.Semaphore](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Semaphore)\n```\nfrom aiodecorators import Semaphore\n\n@Semaphore(n)\nasync def f():\n    pass\n```\n[asyncio.BoundedSemaphore](https://docs.python.org/3/library/asyncio-sync.html#asyncio.BoundedSemaphore)\n```\nfrom aiodecorators import BoundedSemaphore\n\n@BoundedSemaphore(n)\nasync def f():\n    pass\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Function decorators based on asyncio synchronization primitives",
    "version": "0.2.1",
    "split_keywords": [
        "asyncio",
        "aio",
        "lock",
        "semaphore",
        "boundedsemaphore",
        "decorator",
        "decorators",
        "synchronization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "4bb540ee722c5c9c062fc44c84a03722",
                "sha256": "79291f5c339fc0d08fbf91aac1a4568a7d505ba19fa7c08e7bfc2a72357dd4af"
            },
            "downloads": -1,
            "filename": "aiodecorators-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4bb540ee722c5c9c062fc44c84a03722",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1802,
            "upload_time": "2022-12-23T14:24:15",
            "upload_time_iso_8601": "2022-12-23T14:24:15.282361Z",
            "url": "https://files.pythonhosted.org/packages/4b/88/6675e4158d85324348286aec7312a949c87614a6e105cbf3e1274254eb5f/aiodecorators-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "02bca3ad9d502d7da4bd5ddf3de3e74a",
                "sha256": "cd07d5d14c9656934b6bab95729db83e05795097019737f049444d3ee4cd79e5"
            },
            "downloads": -1,
            "filename": "aiodecorators-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "02bca3ad9d502d7da4bd5ddf3de3e74a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1681,
            "upload_time": "2022-12-23T14:24:17",
            "upload_time_iso_8601": "2022-12-23T14:24:17.147195Z",
            "url": "https://files.pythonhosted.org/packages/d0/66/283cf17c0de8932b920d22b3ffeee4bf74d80bc2e44b4705bd1c0a3a2bc4/aiodecorators-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-23 14:24:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "dflupu",
    "github_project": "aiodecorators",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "aiodecorators"
}
        
Elapsed time: 0.02649s