{ "info": { "author": "Alex Couper", "author_email": "info@alexcouper.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: MacOS", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "bash for python\n===============\n\nA library that enables easy running and concatenation of bash commands in\npython\n\nInstallation\n------------\n\nInstall using pip::\n\n pip install bash\n\n\nUsage\n-----\n\nRun commands as you would in bash::\n\n >>> from bash import bash\n >>> bash('ls . | grep \".pyc\"')\n bash.pyc\n tests.pyc\n\nChain commands for the same effect::\n\n >>> bash('ls . ').bash('grep \".pyc\"')\n bash.pyc\n tests.pyc\n\nThis becomes increasingly useful if you later need to reuse one such command::\n\n >>> b = bash('ls . ')\n >>> b.bash('grep \".pyc\"')\n bash.pyc\n tests.pyc\n >>> b.bash('grep \".py$')\n bash.py\n tests.py\n\nAccess stdout and stderr attributes::\n\n >>> b = bash('ls tests.py')\n >>> b.stdout\n 'tests.py\\n'\n >>> b.stderr\n ''\n\nGet the return code generated by a command::\n\n >>> b = bash('ls tests.py')\n >>> b\n tests.py\n >>> b.code\n 0\n\n\nTo get a stripped, unicode string version of bash.stdout call value()::\n\n >>> b = bash('ls tests.py').value()\n u'tests.py'\n\n\nMotivation\n----------\n\nI found that I was often having to write the same lines of code to handle\nrunning bash commands from python.\n\nThis provides a pip-installable, tested shortcut to writing::\n\n from subprocess import PIPE, Popen\n\n p = Popen(cmd, shell=True, stdout=PIPE, stdin=PIPE, stderr=PIPE)\n output, err = p.communicate()\n\n\nWarning\n-------\n\nPlease note that this library uses ``shell=True`` under the hood. This means\nthat this library is **NOT** suitable for running untrusted commands.\n`(See explanation) `_\n\n\nRunning the tests\n-----------------\n\nSimply use a test runner.\n\n $ nosetests\n\nSupport + Contributing\n----------------------\n\nFeel free to make pull requests, or report issues via the repo:\n\nhttps://github.com/alexcouper/bash", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alexcouper/bash", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "bash", "package_url": "https://pypi.org/project/bash/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bash/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/alexcouper/bash" }, "release_url": "https://pypi.org/project/bash/0.6/", "requires_dist": null, "requires_python": null, "summary": "Bash for Python", "version": "0.6" }, "last_serial": 2141299, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ab39aca21a83db966267aa6d9af62080", "sha256": "d47add4e147aac0d1bb51e64b0d5a1c0347c84a696a3c616979c369e6ab98e98" }, "downloads": -1, "filename": "bash-0.1.tar.gz", "has_sig": false, "md5_digest": "ab39aca21a83db966267aa6d9af62080", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2308, "upload_time": "2014-08-02T21:01:24", "url": "https://files.pythonhosted.org/packages/ae/a7/11a7c2a2d52b82a5ae3b3987914300fb9c100e0f076bc7a88639e69ed563/bash-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8997a26d87aa4c6cdc9c7f132e0ec40a", "sha256": "6b0c8d8239f4f578bbaf9715b548b0f915d78597d89423e12e0786572b51d163" }, "downloads": -1, "filename": "bash-0.2.tar.gz", "has_sig": false, "md5_digest": "8997a26d87aa4c6cdc9c7f132e0ec40a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2376, "upload_time": "2014-08-21T21:30:22", "url": "https://files.pythonhosted.org/packages/9b/28/c7a2344f00ffcd6b05103e72d18579604dff7c8150086d3ec375d189d80a/bash-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "c8eec18f211cf38e5424d9df53364ac1", "sha256": "0fbed67d7140e3d51206735d3217604f4366012e7cc5ddaf9c020062f4828e16" }, "downloads": -1, "filename": "bash-0.3.tar.gz", "has_sig": false, "md5_digest": "c8eec18f211cf38e5424d9df53364ac1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2410, "upload_time": "2014-08-26T22:26:59", "url": "https://files.pythonhosted.org/packages/96/6c/08bd06c0b21c3e9663a29f30cf5b37908b40daa599a0dc689e5d2367ee76/bash-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "2e0962ab191019d46bbe27f8007c8c81", "sha256": "175fd04419932be76fb4e63887cbcbd6e54a476e7044278f2229944ed26393c6" }, "downloads": -1, "filename": "bash-0.3.1.tar.gz", "has_sig": false, "md5_digest": "2e0962ab191019d46bbe27f8007c8c81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2432, "upload_time": "2014-08-26T22:31:49", "url": "https://files.pythonhosted.org/packages/3c/23/bae38e0d048d4884aec2743bb1e36d47fc76f0a8d45a8d3e7b6750fcc643/bash-0.3.1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "d6b7854c42f81507bed55c5612a85ac9", "sha256": "ad8087026b40c0f867c3b2e1afa80084d05d329119029276e76570e11fe6951f" }, "downloads": -1, "filename": "bash-0.4.tar.gz", "has_sig": false, "md5_digest": "d6b7854c42f81507bed55c5612a85ac9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2745, "upload_time": "2015-10-23T13:41:46", "url": "https://files.pythonhosted.org/packages/95/12/d71681407a5b89a90103b48d3431e5fb4c0f6278276443f6f3ade6027df6/bash-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "57fc6d77059dda81d993b5c67af51851", "sha256": "a74543b3734e126b46718a19d54bd9114be1e0c3ba39859bfbdf3c621f22ae88" }, "downloads": -1, "filename": "bash-0.5.tar.gz", "has_sig": false, "md5_digest": "57fc6d77059dda81d993b5c67af51851", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2797, "upload_time": "2016-01-31T17:40:23", "url": "https://files.pythonhosted.org/packages/ae/8d/aadbb027eb921c830ae3e38f8eedd82f70c11b47051f2324b92c54d0f89a/bash-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "d0c7584c830401e8451b30727ddaa4fb", "sha256": "2f79cb477d2763e6a24ca89314daef03b4cd899e02acec2635c95ea942736c68" }, "downloads": -1, "filename": "bash-0.6.tar.gz", "has_sig": false, "md5_digest": "d0c7584c830401e8451b30727ddaa4fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2838, "upload_time": "2016-05-30T19:56:39", "url": "https://files.pythonhosted.org/packages/42/30/4870d449947581ff48f213c206d103e9458b0070dbc436c50b1b95007043/bash-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d0c7584c830401e8451b30727ddaa4fb", "sha256": "2f79cb477d2763e6a24ca89314daef03b4cd899e02acec2635c95ea942736c68" }, "downloads": -1, "filename": "bash-0.6.tar.gz", "has_sig": false, "md5_digest": "d0c7584c830401e8451b30727ddaa4fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2838, "upload_time": "2016-05-30T19:56:39", "url": "https://files.pythonhosted.org/packages/42/30/4870d449947581ff48f213c206d103e9458b0070dbc436c50b1b95007043/bash-0.6.tar.gz" } ] }