{ "info": { "author": "CUP-DEV Team", "author_email": "mythmgn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "**Plz visit http://cup.iobusy.com for details!**\n\n**\u8bf7\u5927\u5bb6\u8bbf\u95ee\u5b98\u7f51 http://cup.iobusy.com \u83b7\u53d6\u66f4\u591a\u4fe1\u606f**\n\n\n## Quick Start\n### 1. Download\n - git clone CUP or download the released tar balls\n\n### 2. Installation\n\nInstall from pip, latest(2.0.3):\n\n```bash\npip install cup\n```\n\nInstall from source code:\n\n```bash\n python setup.py install\n```\n\n### 3. Doc & Wiki\n\nVisit Wiki to see more details: https://github.com/Baidu/CUP/wiki\n\nVisit Doc site to see py-docs: http://cupdoc.iobusy.com/\n\n```python\n# Examples:\n# 1. Get system info\nimport cup\n# count cpu usage in interval, by default 60 seconds\nfrom cup.res import linux\ncpuinfo = linux.get_cpu_usage(intvl_in_sec=60)\nprint cpuinfo.usr\n\n# total, available, percent, used, free, active, inactive, buffers, cached\nfrom cup.res import linux\nmeminfo = linux.get_meminfo()\nprint meminfo.total\nprint meminfo.available\n```\n\n\n## Tests\n - Install python-nose before running the tests\n - run `cd ./cup_tests; nosetests -s`\n\n## Contribute To CUP\n - Commit code to GITHUB, https://github.com/baidu/CUP\n - Need to check pep8 and pylint rules before you start a pull request\n\n## Discussion\n - Github Issues\n\n## Reference\n * Pexpect http://pexpect.sourceforge.net/ (under MIT license)\n * Httplib2 http://code.google.com/p/httplib2/ (under MIT license)\n * requests https://github.com/kennethreitz/requests (under Apache V2 license)\n * pymysql https://github.com/PyMySQL/PyMySQL (under MIT license)\n\n## WIKI\nhttps://github.com/Baidu/CUP/wiki\n\n## code directory tree:\n\n```text\ncup\n |-- cache.py module Memory cache related module\n |-- decorators.py module Decorators of python\n |-- err.py module Exception classes for CUP\n |-- __init__.py module Default __init__.py\n |-- log.py module CUP logging\n |-- mail.py module CUP Email module (send emails)\n |-- net package Network operations, such as net handler parameter tuning\n |-- oper.py module Mixin operations\n |-- platforms.py module Cross-platform operations\n |-- res package Resource usage queries (in /proc)\u3001Process query\u3001etc\n |-- shell package Shell Operations\u3001cross-hosts execution\n |-- services package Heartbeat\u3001Threadpool based executors\u3001file service\u3001etc\n |-- thirdp package Third-party modules\uff1a pexpect\u3001httplib2\n |-- timeplus.py module Time related module\n |-- unittest.py module Unittest\u3001assert\u3001noseClass\n |-- util package ThreadPool\u3001Interruptable-Thread\u3001Rich configuration\u3001etc\n |-- version.py module CUP Version\n```\n\n\n\n## \u5feb\u901f\u5f00\u59cb\n### 1. \u4e0b\u8f7d\n - \u514b\u9686git\u4ee3\u7801\u6216\u8005\u4e0b\u8f7d\u5df2\u53d1\u5e03\u7684tar\u5305\n\n### 2. \u5b89\u88c5\n - run `python setup.py install`\n\n### 3. \u4f7f\u7528\u8bf4\u660e\n- Visit Wiki to see more details: https://github.com/Baidu/CUP/wiki\n- Visit Doc site to see py-docs: http://cupdoc.iobusy.com/\n\n\u4e3e\u4f8b\u8bf4\u660e\uff1a\n\n```python\n# Examples:\n# 1. Get system info\nimport cup\n# count cpu usage in interval, by default 60 seconds\nfrom cup.res import linux\ncpuinfo = linux.get_cpu_usage(intvl_in_sec=60)\nprint cpuinfo.usr\n\n# total, available, percent, used, free, active, inactive, buffers, cached\nfrom cup.res import linux\nmeminfo = linux.get_meminfo()\nprint meminfo.total\nprint meminfo.available\n```\n\n\n## Tests\n - Install python-nose before running the tests\n - run `cd ./cup_tests; nosetests -s`\n\n## \u5411CUP\u8d21\u732e\u4ee3\u7801\n\u76f4\u63a5\u5728github\u4e2d\u63d0\u4ea4patch\u5c31\u53ef\u4ee5\u4e86\n - Commit code to GITHUB, https://github.com/baidu/CUP\n - Need to check pep8 and pylint rules before you start a pull request\n\n## Discussion\n - Github Issues\n\n## Reference\n * Pexpect http://pexpect.sourceforge.net/ (under MIT license)\n * Httplib2 http://code.google.com/p/httplib2/ (under MIT license)\n * requests https://github.com/kennethreitz/requests (under Apache V2 license)\n * pymysql https://github.com/PyMySQL/PyMySQL (under MIT license)\n\n## \u4ee3\u7801\u6811\u7ed3\u6784:\n\n```text\ncup\n |-- cache.py module \u7f13\u5b58\u76f8\u5173\u6a21\u5757 \uff08Memory cache related module\uff09\n |-- decorators.py module python\u4fee\u9970\u7b26\uff0c\u6bd4\u5982@Singleton\u5355\u4f8b\u6a21\u5f0f (Decorators of python)\n |-- err.py module \u5f02\u5e38exception\u7c7b, Exception classes for CUP\n |-- __init__.py module \u9ed8\u8ba4__init__.py, Default __init__.py\n |-- log.py module \u6253\u5370\u65e5\u5fd7\u7c7b\uff0cCUP\u7684\u6253\u5370\u65e5\u5fd7\u6bd4\u8f83\u7b80\u6d01\u3001\u89c4\u8303\uff0c\u8bbe\u7f6e\u7edf\u4e00\u3001\u7b80\u5355(cup logging module)\n |-- mail.py module \u53d1\u9001\u90ae\u4ef6 \uff08CUP Email module (send emails)\uff09\n |-- net package \u7f51\u7edc\u76f8\u5173\u64cd\u4f5c\uff08Network operations, such as net handler parameter tuning\uff09\n |-- oper.py module \u4e00\u4e9b\u6df7\u6742\u64cd\u4f5c(Mixin operations)\n |-- platforms.py module \u8de8\u5e73\u53f0\u3001\u5e73\u53f0\u76f8\u5173\u64cd\u4f5c\u51fd\u6570(Cross-platform operations)\n |-- res package \u8d44\u6e90\u83b7\u53d6\u3001\u5b9e\u65f6\u7528\u91cf\u7edf\u8ba1\u7b49\uff0c\u6240\u6709\u5728/proc\u53ef\u83b7\u5f97\u7684\u7cfb\u7edf\u8d44\u6e90\u3001\u8fdb\u7a0b\u3001\u8bbe\u5907\u7b49\u4fe1\u606f \uff08Resource usage queries (in /proc)\u3001Process query\u3001etc\uff09\n |-- shell package \u547d\u4ee4Shell\u64cd\u4f5cpakcage\uff08Shell Operations\u3001cross-hosts execution\uff09\n |-- services package \u6784\u5efa\u670d\u52a1\u652f\u6301\u7684\u7c7b\uff08\u6bd4\u5982\u5fc3\u8df3\u3001\u7ebf\u7a0b\u6c60based\u6267\u884c\u5668\u7b49\u7b49\uff09Heartbeat\u3001Threadpool based executors\u3001file service\u3001etc\n |-- thirdp package \u7b2c\u4e09\u65b9\u4f9d\u8d56\u7eafPy\u6a21\u5757\uff08Third-party modules\uff1a pexpect\u3001httplib2\uff09\n |-- timeplus.py module \u65f6\u95f4\u76f8\u5173\u7684\u6a21\u5757(Time related module)\n |-- unittest.py module \u5355\u5143\u6d4b\u8bd5\u652f\u6301\u6a21\u5757\uff08Unittest\u3001assert\u3001noseClass\uff09\n |-- util package \u7ebf\u7a0b\u6c60\u3001\u53ef\u6253\u65ad\u7ebf\u7a0b\u3001\u8bed\u4e49\u4e30\u5bcc\u7684\u914d\u7f6e\u6587\u4ef6\u652f\u6301\uff08ThreadPool\u3001Interruptable-Thread\u3001Rich configuration\u3001etc\uff09\n |-- version.py module \u5185\u90e8\u7248\u672c\u6587\u4ef6\uff0cCUP Version\n```\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://cup.iobusy.com", "keywords": "library common network threadpool baselib framework", "license": "Apache 2", "maintainer": "Guannan Ma mythmgn@gmail.com @mythmgn", "maintainer_email": "", "name": "cup", "package_url": "https://pypi.org/project/cup/", "platform": "", "project_url": "https://pypi.org/project/cup/", "project_urls": { "Homepage": "https://cup.iobusy.com" }, "release_url": "https://pypi.org/project/cup/2.2.0/", "requires_dist": null, "requires_python": "", "summary": "A common useful python library", "version": "2.2.0" }, "last_serial": 5336231, "releases": { "0.1.0": [], "0.1.1": [], "0.1.2": [], "0.2.0": [], "2.0.2": [ { "comment_text": "", "digests": { "md5": "b97adb01db43662ad922b20ec70540cf", "sha256": "063d9c0be24f1b52562f4558cbd734d5cb650a9c5f124b40a7b4b44b7ff7c36f" }, "downloads": -1, "filename": "cup-2.0.2.tar.gz", "has_sig": false, "md5_digest": "b97adb01db43662ad922b20ec70540cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 453129, "upload_time": "2019-03-01T06:23:43", "url": "https://files.pythonhosted.org/packages/ab/4f/45e37dce4c1499575baeb9594f64e6d43f1ce625234f398cc94e18de2c79/cup-2.0.2.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "bdf706ab74169408affb09ba1ff68db6", "sha256": "2d2314d7c2bdb512fed9cfdb3836b75d9affcfa0b6aec99555d8bf5717a0a82d" }, "downloads": -1, "filename": "cup-2.0.3.tar.gz", "has_sig": false, "md5_digest": "bdf706ab74169408affb09ba1ff68db6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 453166, "upload_time": "2019-03-01T06:45:03", "url": "https://files.pythonhosted.org/packages/19/e6/805df4834c14e476442ec8936212cd6050327cb9208f623cace8fa3591c0/cup-2.0.3.tar.gz" } ], "2.2.0": [ { "comment_text": "", "digests": { "md5": "13c643229eee4b3439eab7cf04058bb5", "sha256": "81a2fd2bdf590ed6b49bd309e604e6029da3c182145affe742beca85fd4a9c64" }, "downloads": -1, "filename": "cup-2.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "13c643229eee4b3439eab7cf04058bb5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 612704, "upload_time": "2019-05-30T08:03:39", "url": "https://files.pythonhosted.org/packages/d1/bd/1c3500537542eb4eaf4c918bdd7819362cecd79aed1e50cd4ab81a2ac36e/cup-2.2.0-py2-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "13c643229eee4b3439eab7cf04058bb5", "sha256": "81a2fd2bdf590ed6b49bd309e604e6029da3c182145affe742beca85fd4a9c64" }, "downloads": -1, "filename": "cup-2.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "13c643229eee4b3439eab7cf04058bb5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 612704, "upload_time": "2019-05-30T08:03:39", "url": "https://files.pythonhosted.org/packages/d1/bd/1c3500537542eb4eaf4c918bdd7819362cecd79aed1e50cd4ab81a2ac36e/cup-2.2.0-py2-none-any.whl" } ] }