py-heart-locker


Namepy-heart-locker JSON
Version 1.0 PyPI version JSON
download
home_pagehttps://github.com/EXP-Codes/py-heart-locker
SummaryPython process locker to avoid repeatedly executing the same script at the same time
upload_time2023-10-03 23:31:20
maintainer
docs_urlNone
authorEXP
requires_python>=3.5, <4
license
keywords locker lock
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # py-heart-locker

> python 进程锁定器,避免同一时间重复执行相同的脚本

------

## 运行环境

![](https://img.shields.io/badge/Python-3.8%2B-brightgreen.svg)


## 使用说明

1. 安装: `python -m pip install py-heart-locker`
2. 在代码中使用:

```python
from lock import locker

def main() :
    if locker.islocked() :
        return
    locker.lock()

    core()


def core() :
    # 业务核心代码


if __name__ == '__main__' :
    main()
    
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EXP-Codes/py-heart-locker",
    "name": "py-heart-locker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5, <4",
    "maintainer_email": "",
    "keywords": "locker,lock",
    "author": "EXP",
    "author_email": "289065406@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/f9/9f/069605db5e317962457e7d9b125fa7af8ee23de299eaffe04951055404eb/py-heart-locker-1.0.tar.gz",
    "platform": null,
    "description": "# py-heart-locker\n\n> python \u8fdb\u7a0b\u9501\u5b9a\u5668\uff0c\u907f\u514d\u540c\u4e00\u65f6\u95f4\u91cd\u590d\u6267\u884c\u76f8\u540c\u7684\u811a\u672c\n\n------\n\n## \u8fd0\u884c\u73af\u5883\n\n![](https://img.shields.io/badge/Python-3.8%2B-brightgreen.svg)\n\n\n## \u4f7f\u7528\u8bf4\u660e\n\n1. \u5b89\u88c5: `python -m pip install py-heart-locker`\n2. \u5728\u4ee3\u7801\u4e2d\u4f7f\u7528\uff1a\n\n```python\nfrom lock import locker\n\ndef main() :\n    if locker.islocked() :\n        return\n    locker.lock()\n\n    core()\n\n\ndef core() :\n    # \u4e1a\u52a1\u6838\u5fc3\u4ee3\u7801\n\n\nif __name__ == '__main__' :\n    main()\n    \n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python process locker to avoid repeatedly executing the same script at the same time",
    "version": "1.0",
    "project_urls": {
        "Bug Reports": "https://github.com/EXP-Codes/py-heart-locker/issues",
        "Funding": "https://github.com/EXP-Codes/py-heart-locker/blob/master/imgs/donate-alipay.png",
        "Homepage": "https://github.com/EXP-Codes/py-heart-locker",
        "Say Thanks!": "https://github.com/EXP-Codes/py-heart-locker/blob/master/imgs/donate-wechat.png",
        "Source": "https://github.com/EXP-Codes/py-heart-locker/"
    },
    "split_keywords": [
        "locker",
        "lock"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "81cd902bd8393895e821c61acd362dab5a6f7ae9905f82007c50fd37a4575696",
                "md5": "0c2c43c836cd2c6984362e2b0349ba3f",
                "sha256": "1843bb0f90f971ae1831ac0b92f65d476cecedb88ef36ecf6bdad35c8efdd473"
            },
            "downloads": -1,
            "filename": "py_heart_locker-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c2c43c836cd2c6984362e2b0349ba3f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5, <4",
            "size": 3565,
            "upload_time": "2023-10-03T23:31:18",
            "upload_time_iso_8601": "2023-10-03T23:31:18.837188Z",
            "url": "https://files.pythonhosted.org/packages/81/cd/902bd8393895e821c61acd362dab5a6f7ae9905f82007c50fd37a4575696/py_heart_locker-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f99f069605db5e317962457e7d9b125fa7af8ee23de299eaffe04951055404eb",
                "md5": "8a8eb49b1f3c1c3b44c67014a87892ab",
                "sha256": "5df75c72984d0ca58d86fb153395a8c34ed1548c7f435ad72b4a3c493365c0fe"
            },
            "downloads": -1,
            "filename": "py-heart-locker-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8a8eb49b1f3c1c3b44c67014a87892ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5, <4",
            "size": 6191,
            "upload_time": "2023-10-03T23:31:20",
            "upload_time_iso_8601": "2023-10-03T23:31:20.341581Z",
            "url": "https://files.pythonhosted.org/packages/f9/9f/069605db5e317962457e7d9b125fa7af8ee23de299eaffe04951055404eb/py-heart-locker-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-03 23:31:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EXP-Codes",
    "github_project": "py-heart-locker",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "py-heart-locker"
}
        
EXP
Elapsed time: 2.49096s