cmk-tools


Namecmk-tools JSON
Version 1.1.3 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-11-21 04:23:59
maintainerNone
docs_urlNone
authorNhanDD3
requires_python<4.0,>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CmkRedisTools

## Installation

To install the CmkRedisTools package, you can use pip:

```sh
pip install cmk-tools
```
or

```sh
poetry add cmk-tools
```

## Testing

To run tests for CmkRedisTools, use the following command:

```sh
pytest
```

## Example

Here is a simple example of how to use CmkRedisTools:

```python
from cmk_tools import RedisSemaphore, run_with_semaphore

semaphore = RedisSemaphore(
    'redis://localhost:6379/0',
    name="my_semaphore",
    limit=3,            # limit concurrent running task
    timeout=10          # accquire timeout
)

run_with_semaphore(
    your_func,
    func_args,
    func_kwargs,
    execute_when_timeout=True       # execute function if accquired timeout
)
```

For more detailed documentation, email me.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cmk-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "NhanDD3",
    "author_email": "nhandd3@fpt.com",
    "download_url": "https://files.pythonhosted.org/packages/1b/d5/696fe7520301c2147cb94b223190f44e233a1c8862610333e2cb6abd7387/cmk_tools-1.1.3.tar.gz",
    "platform": null,
    "description": "# CmkRedisTools\n\n## Installation\n\nTo install the CmkRedisTools package, you can use pip:\n\n```sh\npip install cmk-tools\n```\nor\n\n```sh\npoetry add cmk-tools\n```\n\n## Testing\n\nTo run tests for CmkRedisTools, use the following command:\n\n```sh\npytest\n```\n\n## Example\n\nHere is a simple example of how to use CmkRedisTools:\n\n```python\nfrom cmk_tools import RedisSemaphore, run_with_semaphore\n\nsemaphore = RedisSemaphore(\n    'redis://localhost:6379/0',\n    name=\"my_semaphore\",\n    limit=3,            # limit concurrent running task\n    timeout=10          # accquire timeout\n)\n\nrun_with_semaphore(\n    your_func,\n    func_args,\n    func_kwargs,\n    execute_when_timeout=True       # execute function if accquired timeout\n)\n```\n\nFor more detailed documentation, email me.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "1.1.3",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0dd7e840a9f66368a56350fa445f0390bf8ae0b053d699eb98373d528107bc6f",
                "md5": "97098d6b1fec606ce460b902b3b9fbcc",
                "sha256": "2b502aca474cfd2097e9952fccb34fe2c1e05ea2be779cfdd3f8aa3ab91cd162"
            },
            "downloads": -1,
            "filename": "cmk_tools-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "97098d6b1fec606ce460b902b3b9fbcc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 8956,
            "upload_time": "2024-11-21T04:23:57",
            "upload_time_iso_8601": "2024-11-21T04:23:57.613960Z",
            "url": "https://files.pythonhosted.org/packages/0d/d7/e840a9f66368a56350fa445f0390bf8ae0b053d699eb98373d528107bc6f/cmk_tools-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1bd5696fe7520301c2147cb94b223190f44e233a1c8862610333e2cb6abd7387",
                "md5": "aa38c94f6c26c4dd2cbd82b5665a0c82",
                "sha256": "1514b0efc3b8d951ea266765be1a2c81233f1f41adead0bf09072c5cad3aa976"
            },
            "downloads": -1,
            "filename": "cmk_tools-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "aa38c94f6c26c4dd2cbd82b5665a0c82",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 7129,
            "upload_time": "2024-11-21T04:23:59",
            "upload_time_iso_8601": "2024-11-21T04:23:59.266380Z",
            "url": "https://files.pythonhosted.org/packages/1b/d5/696fe7520301c2147cb94b223190f44e233a1c8862610333e2cb6abd7387/cmk_tools-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-21 04:23:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "cmk-tools"
}
        
Elapsed time: 0.34161s