{ "info": { "author": "Namlook", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "=====\nPypit\n=====\n\nPypit (pronounce \"Pipe it!\") is a python library for building shell pipeline easily via configuration.\n\nThe principe is simple: create a configuration which describes a programmes list with all options and your done.\n\nExemple\n-------\n\nLet's say we have a `file.txt` with the following content::\n \n HellO\n Foo\n BAR\n Bla\n\nThe following configuration will sort the `file.txt` and lower all capitalize chars::\n\n >>> config = [\n ... {\n ... \"cmd\": \"sort -r {{input}}\",\n ... },\n ... {\n ... \"cmd\": \"tr A-Z a-z\",\n ... \"use_stdin\": True\n ... }\n ...]\n\nTo process this configuration::\n\n >>> from pypit import Pypit\n >>> result = Pypit(config).run(file_name=\"file.txt\")\n >>> print result\n hello\n foo\n bla\n bar\n\nExplanation\n-----------\n\nOnly `cmd` is required. This is the command line to use.\n\nIf `use_sdtin` is True, the input will be take from the standard input. \n\n`{{input}}` will describes the input file given to the `run` function. You can use a the `{{output}}` description to specify output file. Be carrefull to specify the `output_ext` then::\n\n >>> config = [\n ... {\n ... 'cmd': 'sort -r {{input}} {{output}}',\n ... 'output_ext': sorted # we need to specify the output extension. Here, the file will be \"file.txt.sorted\"\n ... },\n ... {\n ... 'cmd': 'wc -c {{input}}',\n ... }\n ...]\n >>> Pypit(config).run(file_name='file.txt')\n '6\\n'\n\nNote that if the file is in another directory, you can specify if with `cwd` argument::\n\n >>> Pypit(config).run(file_name='file.txt', 'cwd'='/tmp')\n '6\\n'\n\nFinally, it is possible to take a look at the generated command line via the `cmdline` attribute::\n\n >>> pypit = Pypit(config)\n >>> res = pypit.run(file_name='file.txt')\n >>> pypit.cmdline\n 'sort -r file.txt file.txt.sorted && wc -c file.txt.sorted\n \nErrors may occure in your pipeline. To debug it and display errors use the `errors` attribute which act like a file::\n\n >>> pypit.errors.read()\n\nShell script usage\n------------------\n\nPypit package provides a shell commands to execute pypit configuration in yaml format. To do the following example, you have to create a `config.yaml` file::\n\n - \n path: /bin\n shell: true\n name: echo \"12345\"\n\n - \n path: /usr/bin\n name: wc\n input: STDIN\n options: -c\n\n\nthen call the `pypit` programme with the config file as argument::\n\n $ pypit config.yaml\n 6\n\nIf you build your config to handle dynamic file, you can pass those file in arguments::\n\n -\n path: /usr/bin\n name: sort\n input: STDIN\n options: -r\n -\n path: /usr/bin\n name: wc\n input: STDIN\n options: -l\n\n $ pypit config.yaml file.txt\n 6\n\n\nVersion\n-------\n\nv0.2.2\n~~~~~~\n\n * add errors handle\n\nv0.2.1\n~~~~~~\n\n * fix issue when with utf-8 options\n\nv0.2\n~~~~\n\n * add dynamic file input support", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/namlook/pypit", "keywords": null, "license": "New BSD License", "maintainer": null, "maintainer_email": null, "name": "pypit", "package_url": "https://pypi.org/project/pypit/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pypit/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/namlook/pypit" }, "release_url": "https://pypi.org/project/pypit/2.2/", "requires_dist": null, "requires_python": null, "summary": "Shell pipeline builder", "version": "2.2" }, "last_serial": 797544, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2cebc606746adb5912b80ad3181b245f", "sha256": "f90198182ca966e7f5ae253c87036170def84ad255852d735da216ebdbf0a60e" }, "downloads": -1, "filename": "pypit-0.1.tar.gz", "has_sig": false, "md5_digest": "2cebc606746adb5912b80ad3181b245f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8439, "upload_time": "2010-05-26T15:13:43", "url": "https://files.pythonhosted.org/packages/5e/09/ccf8959053f65926685df7c320f1027d2207175bd5d59b31a549eb445036/pypit-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "546a019302ada8376b64054c119b07ca", "sha256": "f946c7028b528c64b378c7af6a6e78b1f55441975de6c68d38732c08919570d9" }, "downloads": -1, "filename": "pypit-0.2.tar.gz", "has_sig": false, "md5_digest": "546a019302ada8376b64054c119b07ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9069, "upload_time": "2010-05-31T12:12:20", "url": "https://files.pythonhosted.org/packages/87/b4/b69c0ceeffda0da4e1e32e807328f23bce341e910099091e43bcd98bec8b/pypit-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7c1f577b8be96e561f75231eafa82617", "sha256": "55a47c41e39a0d50146f85dd14abaeab4fad020201090f82792ed723e84f70bc" }, "downloads": -1, "filename": "pypit-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7c1f577b8be96e561f75231eafa82617", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9594, "upload_time": "2010-06-03T12:36:16", "url": "https://files.pythonhosted.org/packages/d8/4e/c1c80a3bc18b01c9730d9c346a46ca22d2ec6bb1a2658100a760078c3f6c/pypit-0.2.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "510cfecc0d32501440c503446f1670b7", "sha256": "e9c2412d740ebb5fcf8ea7e863d368ca39566e9472af276e39ed3cf37dd1595f" }, "downloads": -1, "filename": "pypit-0.3.tar.gz", "has_sig": false, "md5_digest": "510cfecc0d32501440c503446f1670b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12949, "upload_time": "2010-07-16T16:18:21", "url": "https://files.pythonhosted.org/packages/c7/30/81e3f8c3b44ae44e46d41b445f9183b39c62f74735950d705803419ab40b/pypit-0.3.tar.gz" } ], "2.2": [ { "comment_text": "", "digests": { "md5": "f60f5152c0b86319034fb650512c79cf", "sha256": "c2f218f3364ae5f942d99cd088b174f9834e5f7587bd9cb555c3c80764a1eb13" }, "downloads": -1, "filename": "pypit-2.2.tar.gz", "has_sig": false, "md5_digest": "f60f5152c0b86319034fb650512c79cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9801, "upload_time": "2010-07-29T11:06:56", "url": "https://files.pythonhosted.org/packages/5f/f7/7ec86c4708440e2c9d3d445fa6898662e59044ad023d2648b937e99f3962/pypit-2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f60f5152c0b86319034fb650512c79cf", "sha256": "c2f218f3364ae5f942d99cd088b174f9834e5f7587bd9cb555c3c80764a1eb13" }, "downloads": -1, "filename": "pypit-2.2.tar.gz", "has_sig": false, "md5_digest": "f60f5152c0b86319034fb650512c79cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9801, "upload_time": "2010-07-29T11:06:56", "url": "https://files.pythonhosted.org/packages/5f/f7/7ec86c4708440e2c9d3d445fa6898662e59044ad023d2648b937e99f3962/pypit-2.2.tar.gz" } ] }