{ "info": { "author": "Sebastian Pawlu\u015b", "author_email": "sebastian.pawlus@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "osome\n=====\n\nThe bucket of python shell wrappers around os library, no dependencies, simple API.\n\n* Python2.6\n* Python2.7\n* Python3.3\n* PyPy1.9\n\n- osome: (python os module wrappers)\n\n - path - path wraper around all methods related to path manipulation\n - run - subprocess wrapper\n\n\nDocumentation\n-------------\nhttps://osome.readthedocs.org/\n\n\nCode\n----\nhttps://github.com/xando/osome\n\n\nInstall\n-------\n\n.. code-block:: bash\n\n pip install osome\n\n\n\nosome.path\n---------------\n\n.. code-block:: python\n\n >>> from osome import path\n\n >>> path('/var/log')\n /var/log\n\n >>> path('/var', 'log')\n /var/log\n\n >>> path('/var/log').own\n '766'\n\n >>> path('/var/log').is_dir()\n True\n\n >>> for e in path('/var/log'):\n ... print e\n /var/log/boot.log\n /var/log/dmesg\n /var/log/faillog\n /var/log/kern.log\n /var/log/gdm\n\n >>> path('/var/log/').ls('*log')\n [/var/log/boot.log, /var/log/faillog, /var/log/kern.log]\n\n >>> path('/var/log') / 'syslog'\n /var/log/syslog\n\n >>> (path('/var/log') / 'syslog').exists\n\n >>> path('/var/log','syslog').open('r')\n \n\n >>> path('/var/log').cp('copy', r=True)\n copy\n\n >>> path('/home/user/test_tmp_directory').replace('_', '-')\n '/home/user/test-tmp-directory'\n\n >>> location = path('/home/user/test_tmp_directory')\n >>> location.mv( location.replace('_', '-') )\n\n\nosome.run\n--------------\n\n\n.. code-block:: python\n\n >>> from osome import run\n\n >>> print run('uname -r').stdout\n 3.7.0-7-generic\n\n >>> run('uname -a').status\n 0\n\n >>> print run('rm not_existing_directory').stderr\n rm: cannot remove `not_existing_directory': No such file or directory\n\n >>> print run('ls -la', 'wc -l', 'wc -c')\n 3\n\n >>> print run('ls -la').stdout.lines\n ['total 20',\n 'drwxrwxr-x 3 user user 4096 Dec 20 22:55 .',\n 'drwxrwxr-x 5 user user 4096 Dec 20 22:57 ..',\n 'drwxrwxr-x 2 user user 4096 Dec 20 22:37 dir',\n '-rw-rw-r-- 1 user user 0 Dec 20 22:52 file']\n\n\n.. code-block:: python\n\n from osome import run\n\n run('grep something', data=run.stdin)\n\n.. code-block:: bash\n\n $ ps aux | python script.py\n\n\ntests\n-----\n\n.. image:: https://api.travis-ci.org/xando/osome.png?branch=master\n\nTravis CI, https://travis-ci.org/xando/osome\n\n\nTests are implemented with `py.tests\n`_, to run:\n\n.. code-block:: bash\n\n python runtests.py\n\n\nbased on/inspired by\n--------------------\n\n* http://www.ruby-doc.org/stdlib-1.9.3/libdoc/fileutils/rdoc/index.html\n* https://github.com/kennethreitz/clint\n* https://github.com/jaraco/path.py\n\n\nauthor\n------\n\n* Sebastina Pawlu\u015b (sebastian.pawlus@gmail.com)\n\n\ncontributors\n------------\n\n* Jakub (kuba.janoszek@gmail.com)\n* Angel Ezquerra", "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/xando/osome", "keywords": "shell tools shell path", "license": "Copyright (c) 2012, Sebastian Pawlu\u015b.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met: \n\n1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer. \n2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution. \n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nThe views and conclusions contained in the software and documentation are those\nof the authors and should not be interpreted as representing official policies, \neither expressed or implied, of the FreeBSD Project.", "maintainer": null, "maintainer_email": null, "name": "osome", "package_url": "https://pypi.org/project/osome/", "platform": "any", "project_url": "https://pypi.org/project/osome/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/xando/osome" }, "release_url": "https://pypi.org/project/osome/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "The bucket of python shell helpers, no dependencies, simple API.", "version": "0.1.2" }, "last_serial": 795872, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6b2c416df5a0c4637b55b4378814eb07", "sha256": "f336be10f651eb6d70a4f9ca84750d4ad8d424162abf0eda615948653613a244" }, "downloads": -1, "filename": "osome-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6b2c416df5a0c4637b55b4378814eb07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9935, "upload_time": "2013-03-10T20:15:28", "url": "https://files.pythonhosted.org/packages/9e/fe/9a1d70c98d783bc80e8b1741d6efd1031181f2709474ff46c297d1e82204/osome-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f04d96a050ed391369b8be6bda8a38bf", "sha256": "d951a06513fe85c8689626a8ac0994124dcd23fbb88988b12b41e546d3d87d7e" }, "downloads": -1, "filename": "osome-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f04d96a050ed391369b8be6bda8a38bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9500, "upload_time": "2013-05-04T09:47:34", "url": "https://files.pythonhosted.org/packages/b1/1d/163567d5706bfb832a9b8eb3a32c491cb17150c3247d541a07967bcb5229/osome-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5cd9a487036b62fbad6897942b3c4508", "sha256": "2fcbdcfcab1e2d503c0e2998a4e6e5e2ea3e4d1e583db02eb34d85f6573e038c" }, "downloads": -1, "filename": "osome-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5cd9a487036b62fbad6897942b3c4508", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9523, "upload_time": "2013-05-05T14:41:22", "url": "https://files.pythonhosted.org/packages/62/a6/41122bca8e574d0efa4ce617a7470038fcc921a9e28e62ab5cce13911690/osome-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5cd9a487036b62fbad6897942b3c4508", "sha256": "2fcbdcfcab1e2d503c0e2998a4e6e5e2ea3e4d1e583db02eb34d85f6573e038c" }, "downloads": -1, "filename": "osome-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5cd9a487036b62fbad6897942b3c4508", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9523, "upload_time": "2013-05-05T14:41:22", "url": "https://files.pythonhosted.org/packages/62/a6/41122bca8e574d0efa4ce617a7470038fcc921a9e28e62ab5cce13911690/osome-0.1.2.tar.gz" } ] }