{ "info": { "author": "Juerg Beringer", "author_email": "juerg.beringer@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: System :: Shells", "Topic :: Utilities" ], "description": "cmdhelper\n=========\n\ncmdhelper is a Python utility for writing command line scripts with a\nconsistent style, default set of command line options, and common\napproach to logging.\n\ncmdhelper provides:\n\n- Parsing of command line options using either argparse or optparse.\n\n- Setup of logging with the possibility to copy stdout or stderr into\n the logfile.\n\n- Possibility to e-mail log messages upon completion with an option\n to send the e-mail only if a log message with a severity at or\n above a trigger level was recorded.\n\n- Definition of a set of default options, including options to set\n verbosity and logging options.\n\n- A utility function to run external commands whose output can be\n logged and parsed for error messages.\n\n- A utility function for asking the user to confirm actions.\n\nExample\n-------\n\nA script that processes different commands with optional command\narguments might include:\n\n::\n\n from cmdhelper import *\n\n cmdHelper = CmdHelper('argparse', __version__)\n cmdHelper.add_argument('cmd', help='command')\n cmdHelper.add_argument('args', help='command arguments', nargs='*')\n cmdHelper.add_option('-x', '--example', dest='value', default=None, help='sample option')\n options = cmdHelper.parse()\n\n try:\n # processing goes here\n pass\n\n except Exception as e:\n handleError(e,options.debug)\n\nRunning the above code with \u2013help will produce the following output:\n\n::\n\n usage: example.py [-h] [--version] [-i] [-v] [--debug] [--noscreen]\n [--logfile LOGFILE] [--loglevel LOGLEVEL]\n [--logseparator LOGSEPARATOR]\n [--logtimestampfmt LOGTIMESTAMPFMT] [--emailto EMAILTO]\n [--emailsubject EMAILSUBJECT] [--emaillevel EMAILLEVEL]\n [--emailtriglevel EMAILTRIGLEVEL] [-x VALUE]\n cmd [args [args ...]]\n\n positional arguments:\n cmd command\n args command arguments\n\n optional arguments:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -i, --interactive enter interactive Python at completion\n -v, --verbose verbose output\n --debug debugging output\n --noscreen disable logging output to screen\n --logfile LOGFILE write logging information to this file (default: )\n --loglevel LOGLEVEL logging level for logfile (default: INFO or DEBUG)\n --logseparator LOGSEPARATOR\n message to write to logfile at beginning of new log\n --logtimestampfmt LOGTIMESTAMPFMT\n timestamp format string (in logging formatter format)\n --emailto EMAILTO email address receiving any log messages\n --emailsubject EMAILSUBJECT\n subject for log e-mails\n --emaillevel EMAILLEVEL\n logging level for e-mails (default: WARNING)\n --emailtriglevel EMAILTRIGLEVEL\n trigger level for sending e-mails (default: None)\n -x VALUE, --example VALUE\n sample option\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/juergberinger/cmdhelper", "keywords": "command line utility", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cmdhelper", "package_url": "https://pypi.org/project/cmdhelper/", "platform": "", "project_url": "https://pypi.org/project/cmdhelper/", "project_urls": { "Homepage": "https://github.com/juergberinger/cmdhelper" }, "release_url": "https://pypi.org/project/cmdhelper/0.2.11/", "requires_dist": null, "requires_python": "", "summary": "Python utility for writing command line scripts with consistent look and feel.", "version": "0.2.11" }, "last_serial": 5257844, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "87446aab1b26188e6679079ea9e61d2c", "sha256": "be070ed9b0595e24f9156dbbce3e3fe67f3a3c79663a32f16f82d2d24120dcb5" }, "downloads": -1, "filename": "cmdhelper-0.2.1.tar.gz", "has_sig": false, "md5_digest": "87446aab1b26188e6679079ea9e61d2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9981, "upload_time": "2015-05-20T00:58:58", "url": "https://files.pythonhosted.org/packages/0c/84/19b8e10c74212014a23a0edbd871e43733835d210df27b8ff022a914a69c/cmdhelper-0.2.1.tar.gz" } ], "0.2.10": [ { "comment_text": "", "digests": { "md5": "5acca52e3fb3095064fcb9a878da9c42", "sha256": "3967ec75b7ce056bea3fd28107d51038cb52bf1f89d6fe28d68a9dd21aa50979" }, "downloads": -1, "filename": "cmdhelper-0.2.10.tar.gz", "has_sig": false, "md5_digest": "5acca52e3fb3095064fcb9a878da9c42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11338, "upload_time": "2019-02-15T04:08:46", "url": "https://files.pythonhosted.org/packages/d4/8c/1758286c91e7bbfadc53a15b7f9d3409881cc4dd1af568312a7bf9ec102e/cmdhelper-0.2.10.tar.gz" } ], "0.2.11": [ { "comment_text": "", "digests": { "md5": "acaca9ca12aba85eeae5044ce8ee5297", "sha256": "33a12ee54694abf2337e3dd6cc91e86a11b06a2fe25388014352e8f1a9c656c1" }, "downloads": -1, "filename": "cmdhelper-0.2.11.tar.gz", "has_sig": false, "md5_digest": "acaca9ca12aba85eeae5044ce8ee5297", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11746, "upload_time": "2019-05-12T02:48:38", "url": "https://files.pythonhosted.org/packages/13/3a/eaefaff7b10a22313e681039ac52511ff3d06620b86102f816520f0f73e1/cmdhelper-0.2.11.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "0460b902332d9843cf9cbc03b01bf199", "sha256": "0fe012af12101c88040ac52dd2e271005941c50821e406ae5eb1598e7b2176e3" }, "downloads": -1, "filename": "cmdhelper-0.2.2.tar.gz", "has_sig": false, "md5_digest": "0460b902332d9843cf9cbc03b01bf199", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10321, "upload_time": "2016-03-13T04:59:31", "url": "https://files.pythonhosted.org/packages/b2/98/aecac9934b533f94693cc07f1cd0a3a949fecb39690111c063786a1242a4/cmdhelper-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "73c2e4ba181eeaed7fdbac874dfa5d5f", "sha256": "9fc485a8e3518e61ebb63a96c86fd8b59e7a095272fc43f225496063591a5bd0" }, "downloads": -1, "filename": "cmdhelper-0.2.3.tar.gz", "has_sig": false, "md5_digest": "73c2e4ba181eeaed7fdbac874dfa5d5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10594, "upload_time": "2016-04-24T03:10:54", "url": "https://files.pythonhosted.org/packages/a1/ab/eb94051f0d1266e76ec0750846c85f8c8f50ebaa1c79e767d1a6f40880e2/cmdhelper-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "ad113ecf4b0a9c5f55b297a5d61db14b", "sha256": "1bfc7841de878fdd36116b1164a0c07c966892476deb19fc163e47b3b2cc9da1" }, "downloads": -1, "filename": "cmdhelper-0.2.4.tar.gz", "has_sig": false, "md5_digest": "ad113ecf4b0a9c5f55b297a5d61db14b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10627, "upload_time": "2016-04-24T03:30:58", "url": "https://files.pythonhosted.org/packages/2d/f5/19cf7dd8642d038a2ab2289e0da927e40bb70541d278b52ea92571315530/cmdhelper-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "42408b87d9f716082e971b14238bf61a", "sha256": "f88734871b90a3ec7479441ff53522a92310926dff0cd3f83c8599f5769df639" }, "downloads": -1, "filename": "cmdhelper-0.2.5.tar.gz", "has_sig": false, "md5_digest": "42408b87d9f716082e971b14238bf61a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11837, "upload_time": "2016-04-26T23:58:06", "url": "https://files.pythonhosted.org/packages/61/35/5b69825cc66a54125deaf59cc0a4ee70663c30b7e311931981e77176edb2/cmdhelper-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "4c323caecc64f9e0a6a757e2a432714e", "sha256": "6b5a5f3cab50c8ae7dc68f1cb2796818c6d968bf3cb7ea00abdc92d99c60e7c2" }, "downloads": -1, "filename": "cmdhelper-0.2.6.tar.gz", "has_sig": false, "md5_digest": "4c323caecc64f9e0a6a757e2a432714e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11879, "upload_time": "2016-04-29T04:08:39", "url": "https://files.pythonhosted.org/packages/75/b7/c8beb29b736ace030a4e4a12fb6a95e54b1e61c28cf3cadadd75a68b6469/cmdhelper-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "37091a2384be930151ab2de4caf5bc98", "sha256": "dd34c56f6cc02f55336dc0b78f5abcb789d4bd052a4dd14c58096c78a474af0e" }, "downloads": -1, "filename": "cmdhelper-0.2.7.tar.gz", "has_sig": false, "md5_digest": "37091a2384be930151ab2de4caf5bc98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11018, "upload_time": "2018-07-30T04:36:21", "url": "https://files.pythonhosted.org/packages/3b/87/8e53d19bbd1a5fe58db3f5b579bcec54915c62b293c144a34bcbc23dab90/cmdhelper-0.2.7.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "ee39a54a62fa238a831be47c6e376adc", "sha256": "9a277a8b0d1c75669b78f2399006a8faae474114281701023cc04ed4017a4eee" }, "downloads": -1, "filename": "cmdhelper-0.2.8.tar.gz", "has_sig": false, "md5_digest": "ee39a54a62fa238a831be47c6e376adc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11069, "upload_time": "2018-09-02T23:07:21", "url": "https://files.pythonhosted.org/packages/97/e7/b1dedace5a9c1b51b02d0a1d0d6aaf60f174373850f3d972db9fefae6129/cmdhelper-0.2.8.tar.gz" } ], "0.2.9": [ { "comment_text": "", "digests": { "md5": "cc1267f9140fcdb8f41f47e5c6b028f2", "sha256": "f5b21534833465fc2d963832b008895fec9417ac14871d68cf42cf3f48c5a752" }, "downloads": -1, "filename": "cmdhelper-0.2.9.tar.gz", "has_sig": false, "md5_digest": "cc1267f9140fcdb8f41f47e5c6b028f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11192, "upload_time": "2019-02-12T06:04:31", "url": "https://files.pythonhosted.org/packages/be/32/52ae9b40a9bff75d5118877997ae9c48f8fd4a2fe8ffc2a89b300f5b2b2b/cmdhelper-0.2.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "acaca9ca12aba85eeae5044ce8ee5297", "sha256": "33a12ee54694abf2337e3dd6cc91e86a11b06a2fe25388014352e8f1a9c656c1" }, "downloads": -1, "filename": "cmdhelper-0.2.11.tar.gz", "has_sig": false, "md5_digest": "acaca9ca12aba85eeae5044ce8ee5297", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11746, "upload_time": "2019-05-12T02:48:38", "url": "https://files.pythonhosted.org/packages/13/3a/eaefaff7b10a22313e681039ac52511ff3d06620b86102f816520f0f73e1/cmdhelper-0.2.11.tar.gz" } ] }