{ "info": { "author": "Raymond Wu", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "The package busm means bring up Samuel. It's allusion comes from Holy Bible 1 Samuel 28:11.\nIt help you find abnormal situations in a background process.\n\nThere are several function decorators and logging handlers inside.\nThese tools can send message of abnormal situations through Email, Telegram or Line Notify.\n\n\u5957\u4ef6 busm \u662f \"\u53ec\u559a\u6492\u6bcd\u8033\" \u7684\u610f\u601d\uff0c\u5178\u6545\u51fa\u81ea\u8056\u7d93\u6492\u6bcd\u8033\u8a18\u4e0a 28 \u7ae0\u7b2c 11 \u7bc0\uff0c\u5176\u5be6\u5c31\u662f\u89c0\u843d\u9670\u7684\u610f\u601d\u3002\n\u9019\u5957\u4ef6\u53ef\u4ee5\u5e6b\u4f60\u627e\u51fa\u80cc\u666f\u4f5c\u696d\u7684\u7570\u5e38\u72c0\u6cc1\u3002\n\n\u88e1\u9762\u6709\u4e00\u4e9b function decorators \u548c logging handlers, \u7528\u9019\u4e9b\u5de5\u5177\u53ef\u4ee5\u628a\u7570\u5e38\u72c0\u6cc1\u900f\u904e\nEmail, Telegram, Line Notify \u9019\u4e9b\u65b9\u5f0f\u9001\u51fa\u53bb\u3002\n\n### Quick Start\n\nFirst, install the package.\n\n```bash\npip install busm\n```\n\nThen add decorators before functions you'd like to monitor.\n\n```python\nimport busm\n\n@busm.through_smtp\ndef foo_email():\n print('It sucks!')\n\n@busm.through_telegram\ndef foo_telegram():\n print('Segmentation fault.')\n\n@busm.through_line\ndef foo_line():\n print('Stack overflow.')\n\nif __name__ == '__main__':\n foo_email()\n foo_telegram()\n foo_line()\n```\n\nRun your python code.\n\n```bash\npython foo.py\n```\n\nYou must see the following message,\nand a config file will be generated in HOME directory.\n\n```\n-----------------------------------------------------------------\n Please change fundog config file (~/.busm.json) to enable.\n-----------------------------------------------------------------\n```\n\nEdit this config file ~/.busm.json to fit for you.\n\n```\n{\n \"smtp\": {\n \"host\": \"smtp.gmail.com\",\n \"port\": 587,\n \"user\": \"someone\",\n \"pass\": \"********\",\n \"from_name\": \"Foo\",\n \"from_email\": \"someone@gmail.com\",\n \"to_name\": \"Master\",\n \"to_email\": \"someone@gmail.com\"\n },\n \"telegram\": {\n \"token\": \"123456789:-----------------------------------\",\n \"master\": \"123456789\"\n },\n \"line-notify\": {\n \"token\": \"\"\n }\n}\n```\n\nRun your python code again.\n\n```bash\npython foo.py\n```\n\nTada! You can preview screenshots [here](https://github.com/virus-warnning/busm/wiki).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/virus-warnning/busm", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "busm", "package_url": "https://pypi.org/project/busm/", "platform": "", "project_url": "https://pypi.org/project/busm/", "project_urls": { "Homepage": "https://github.com/virus-warnning/busm" }, "release_url": "https://pypi.org/project/busm/0.9.1/", "requires_dist": [ "requests", "PyYAML" ], "requires_python": ">=3.5", "summary": "Bring up Samuel. A package for monitoring background process.", "version": "0.9.1" }, "last_serial": 5922628, "releases": { "0.8.0": [ { "comment_text": "", "digests": { "md5": "68a96fd6a16654b4c09c4b30d7bf6014", "sha256": "70820a9f023222b9c5d81686479dfecb9842c9c96524868f754411bc1eafd42e" }, "downloads": -1, "filename": "busm-0.8.0-py3-none-any.whl", "has_sig": false, "md5_digest": "68a96fd6a16654b4c09c4b30d7bf6014", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5091, "upload_time": "2019-06-19T07:23:29", "url": "https://files.pythonhosted.org/packages/53/1c/a9db942359eae4593dbe5cc176d5039e18e633c513ab3c92a4a3a3c631ab/busm-0.8.0-py3-none-any.whl" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "4361387288368479f86aaebef3337d77", "sha256": "6378b3f30f8ed205552170862cade9a15864d335cc071940ad9c9e3afe3f7349" }, "downloads": -1, "filename": "busm-0.9.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4361387288368479f86aaebef3337d77", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 7124, "upload_time": "2019-09-28T05:52:42", "url": "https://files.pythonhosted.org/packages/a5/06/6c4f3b39ed4712a707373ac9eae4485ca3f49aa084b1b443f44eaf702da0/busm-0.9.0-py3-none-any.whl" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "ff1c5debef22757d9a8076b7a9e5f9a2", "sha256": "9ee79cb5b8ac78473f9e270a6fa98e5a30985f5a501ecf34156c75fdf9416bf9" }, "downloads": -1, "filename": "busm-0.9.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ff1c5debef22757d9a8076b7a9e5f9a2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 6611, "upload_time": "2019-10-03T09:43:55", "url": "https://files.pythonhosted.org/packages/7f/f4/cf97c003c59480695a9f58f46f3403c614db588397752b3ebe8a6d5e3e16/busm-0.9.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ff1c5debef22757d9a8076b7a9e5f9a2", "sha256": "9ee79cb5b8ac78473f9e270a6fa98e5a30985f5a501ecf34156c75fdf9416bf9" }, "downloads": -1, "filename": "busm-0.9.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ff1c5debef22757d9a8076b7a9e5f9a2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 6611, "upload_time": "2019-10-03T09:43:55", "url": "https://files.pythonhosted.org/packages/7f/f4/cf97c003c59480695a9f58f46f3403c614db588397752b3ebe8a6d5e3e16/busm-0.9.1-py3-none-any.whl" } ] }