{ "info": { "author": "Vishwas B Sharma", "author_email": "sharma.vishwas88@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "|Logo|\n\n|pypiv| |pyv| |Build| |Coverage| |Licence| |Thanks|\n\n--------------\n\npypette (to be read as pipette) is a module which makes building pipelines\nridiculously simple, allowing users to control the flow with minimal\ninstructions.\n\nFeatures\n--------\n\n* Ridiculously simple interface.\n* Ability to view pipeline structure within the comfort of a terminal.\n* Run pipeline in exception resilient way if needed.\n* Create dependencies on pipelines easily.\n* Generate a easy to view/understand report within the comfort of a terminal.\n\nSetup\n-----\n\nUsing pip\n~~~~~~~~~\n\n.. code:: bash\n\n pip install pypette\n\nDirectly from the repository\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n git clone https://github.com/csurfer/pypette.git\n python pypette/setup.py install\n\nDocumentation\n--------------\n\nDetailed documentation can be found at https://csurfer.github.io/pypette\n\nStructures\n----------\n\nJob\n~~~\n\nThe basic unit of execution, say a python method or a callable.\n\n.. code:: python\n\n from pypette import Job\n\n def print_hello():\n print(\"Hello!\")\n\n def print_hello_msg(msg):\n print(\"Hello \" + msg + \"!\")\n\n # Job without arguments\n j1 = Job(print_hello)\n\n # Job with arguments specified as argument list\n j2 = Job(print_hello_msg, args=(\"pypette is simple\",))\n\n # Job with arguments specified as key word arguments\n j3 = Job(print_hello_msg, kwargs={\"msg\":\"pypette is simple\"})\n\nBashJob\n~~~~~~~\n\nThe basic unit of execution, which runs a bash command.\n\n.. code:: python\n\n from pypette import BashJob\n\n # Job with bash commands\n b1 = BashJob(['ls', '-l'])\n b2 = BashJob(['pwd'])\n\nPipe\n~~~~\n\nStructure to specify the flow in which the jobs need to be executed. The whole\ninterface consists of only 4 methods.\n\n.. code:: python\n\n from pypette import Pipe\n\n # 1. Create a new Pipe\n p = Pipe('TestPipe')\n\n # 2. Add jobs to execute. (Assuming job_list is a list of python/bash jobs)\n\n # To run the jobs in job_list in order one after the other where each job\n # waits for the job before it to finish.\n p.add_jobs(job_list)\n\n # To run the jobs in job_list parallelly and run the next step only after\n # all jobs in job list finish.\n p.add_jobs(job_list, run_in_parallel=True)\n\n # Add jobs in a builder format.\n p.add_stage(job1).add_stage(job2) # To add jobs in series.\n p.add_stage(job1, job2) # To add jobs in parallel.\n\nBuilding complex pipelines\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nJobs submitted to pipeline should be callables i.e. structures which can be\nrun. This means python methods, lambdas etc qualify.\n\nWhat about Pipe itself?\n\nOf course, it is a callable and you can submit a pipe object to be run along\nwith regular jobs. This way you can build small pipelines which achieve a\nspecific task and then combine them to create more complex pipelines.\n\n.. code:: python\n\n from pypette import BashJob, Job, Pipe\n\n def welcome():\n print(\"Welcome user!\")\n\n def havefun():\n print(\"Have fun!\")\n\n def goodbye():\n print(\"Goodbye!\")\n\n # Build a simple pipeline\n p1 = Pipe('Fun')\n p1.add_jobs([\n Job(havefun),\n ])\n\n # Include simple pipeline into a complicated pipeline\n p2 = Pipe('Overall')\n p2.add_jobs([\n Job(welcome),\n p1,\n Job(goodbye),\n BashJob(['ls', '-l']),\n BashJob(['pwd'])\n ])\n\n p2.run() # This first runs welcome, then runs p1 pipeline then runs goodbye.\n\nExample pipeline\n~~~~~~~~~~~~~~~~\n\nAn example pipeline and its code are included in `examples`_ folder.\n\nVisualizing the pipeline using graph()\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPipeline objects have a method called ``graph()`` which helps visualize the\npipeline within the comfort of your terminal. The graph is recursive in nature\nand it visualizes everything that will be run if we call ``run()`` on the pipe\nobject.\n\nVisualizing the top-level pipeline in `examples/basic.py`_ led to the\nfollowing visualization.\n\n|Viz|\n\nRunning the entire pipeline.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe only thing you need to do at this point to run the entire pipeline is to\ncall ``run()`` on your pipeline object.\n\nReporting the entire pipeline.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe only thing you need to do at this point to get the report of entire\npipeline is to call `report()` on your pipeline object.\n\nContributing\n------------\n\nBug Reports and Feature Requests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPlease use `issue tracker`_ for reporting bugs or feature requests.\n\nDevelopment\n~~~~~~~~~~~\n\nPull requests are most welcome.\n\n\nBuy the developer a cup of coffee!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf you found the utility helpful you can buy me a cup of coffee using\n\n|Donate|\n\n.. |Logo| image:: https://i.imgur.com/MBu5x0h.png\n :width: 60%\n :target: https://pypi.python.org/pypi/pypette\n\n.. |Donate| image:: https://www.paypalobjects.com/webstatic/en_US/i/btn/png/silver-pill-paypal-44px.png\n :target: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=3BSBW7D45C4YN&lc=US¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted\n\n.. |Thanks| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg\n :target: https://saythanks.io/to/csurfer\n\n.. _issue tracker: https://github.com/csurfer/pypette/issues\n.. _examples/basic.py: https://github.com/csurfer/pypette/examples/basic.py\n.. _examples: https://github.com/csurfer/pypette/examples\n\n.. |Viz| image:: https://i.imgur.com/1PaPlD3.png\n :width: 200px\n\n.. |Licence| image:: https://img.shields.io/badge/license-MIT-blue.svg\n :target: https://raw.githubusercontent.com/csurfer/pypette/master/LICENSE\n\n.. |Build| image:: https://travis-ci.org/csurfer/pypette.svg?branch=master\n :target: https://travis-ci.org/csurfer/pypette\n\n.. |Coverage| image:: https://coveralls.io/repos/github/csurfer/pypette/badge.svg?branch=master\n :target: https://coveralls.io/github/csurfer/pypette?branch=master\n\n.. |pypiv| image:: https://img.shields.io/pypi/v/pypette.svg\n :target: https://pypi.python.org/pypi/pypette\n\n.. |pyv| image:: https://img.shields.io/pypi/pyversions/pypette.svg\n :target: https://pypi.python.org/pypi/pypette", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/csurfer/pypette", "keywords": "pipeline dev-tool threads multithreading python", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pypette", "package_url": "https://pypi.org/project/pypette/", "platform": "", "project_url": "https://pypi.org/project/pypette/", "project_urls": { "Homepage": "https://github.com/csurfer/pypette" }, "release_url": "https://pypi.org/project/pypette/0.0.9/", "requires_dist": null, "requires_python": "", "summary": "Package to make building pipelines ridiculously simple.", "version": "0.0.9" }, "last_serial": 3913312, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "36c62a9d9770b1c9c18e345e17b06970", "sha256": "c78393e5befffbc1e5afc9bd17d98356b5fa79b72392d958454aeb61a649866c" }, "downloads": -1, "filename": "pypette-0.0.1.tar.gz", "has_sig": false, "md5_digest": "36c62a9d9770b1c9c18e345e17b06970", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6755, "upload_time": "2017-10-28T09:09:02", "url": "https://files.pythonhosted.org/packages/94/6b/2f6cdfa281890bc8201ee2300ea53d85fbf2fff11602736cb7f54df5b941/pypette-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "d9233eaf884b6531a665c4c07a49d9b7", "sha256": "18deca5423fc038d275033f04ff62d958ffeac8e0f3d9126ad889d509f6013ed" }, "downloads": -1, "filename": "pypette-0.0.2.tar.gz", "has_sig": false, "md5_digest": "d9233eaf884b6531a665c4c07a49d9b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6669, "upload_time": "2017-10-28T09:28:47", "url": "https://files.pythonhosted.org/packages/1a/fd/9e9366d967cb7217a9f6c43fadb42a0366ae2819420cff53e97809031660/pypette-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a3fedfc19d64d9769503702f2b3189b6", "sha256": "f48cee9d2f65ac76db8d6c2f5738a8ddd915648d15e0d3d65a4dedc310d14ea7" }, "downloads": -1, "filename": "pypette-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a3fedfc19d64d9769503702f2b3189b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6810, "upload_time": "2017-10-30T07:45:12", "url": "https://files.pythonhosted.org/packages/54/da/54e19e7e464be467b9196bff57cd7da2e7b398c203a6e25ecf02c26e33a8/pypette-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "bb5c59519c8da8a8decf051c56110ec3", "sha256": "f539bd7d088e6027cc36e3f2eccccf2bacf4c336f1ccc4cff66fc4e52d236b90" }, "downloads": -1, "filename": "pypette-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bb5c59519c8da8a8decf051c56110ec3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7048, "upload_time": "2017-10-30T16:49:58", "url": "https://files.pythonhosted.org/packages/ae/3a/9ecaea437ac3acb8a232f489a9432efb3184f1781d6211a3e541f54f3cde/pypette-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "f3ee2bd70e835ea74844fca5ff42d9f4", "sha256": "562d8518668557bf92ed7e42440c42b2b2772a973198d9768bcad0ed5298c0c4" }, "downloads": -1, "filename": "pypette-0.0.5.tar.gz", "has_sig": false, "md5_digest": "f3ee2bd70e835ea74844fca5ff42d9f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7050, "upload_time": "2017-10-30T17:22:40", "url": "https://files.pythonhosted.org/packages/fb/8a/a640baa1b6fcbb2e1ecb0afaeeb3bdb9d081ef37986363cd7bdfd720fa83/pypette-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f9dd71da94b0d453688c10e93de1d42e", "sha256": "2fbe7609d2bc635047ab848074f0e9b3c2139339b08b6a049f80debc3c21358f" }, "downloads": -1, "filename": "pypette-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f9dd71da94b0d453688c10e93de1d42e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7377, "upload_time": "2017-11-01T06:24:34", "url": "https://files.pythonhosted.org/packages/97/bc/cb6d5c19cec119372226bd1b181cc56a38d852d1971d729fc00b4d8df677/pypette-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "89d4e433ed85889d31f19a19c2773a53", "sha256": "f695d5bcd31d35744ccb6b2f850e7e05978edf6b120d10426724772e94a7c882" }, "downloads": -1, "filename": "pypette-0.0.7.tar.gz", "has_sig": false, "md5_digest": "89d4e433ed85889d31f19a19c2773a53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7424, "upload_time": "2017-11-01T09:43:32", "url": "https://files.pythonhosted.org/packages/7c/47/1b6852d634dfb7253bcf5e1be78f1060f24580654ad63e055a18249e3fb4/pypette-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "a2ae9a7a8486fecc27c24cf4c5911824", "sha256": "4e90fb2046dc82333e9cff44046b3f4496dcf78f63a28d627072153090ad84cf" }, "downloads": -1, "filename": "pypette-0.0.8.tar.gz", "has_sig": false, "md5_digest": "a2ae9a7a8486fecc27c24cf4c5911824", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7457, "upload_time": "2017-11-10T06:16:06", "url": "https://files.pythonhosted.org/packages/4b/ef/79532ff04ce70b04d760d0ee1b0c946b19f1b305258bcddda869cd46727a/pypette-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "49bb778f057a4d958b77b2042c0f7b13", "sha256": "ad58c77f8929a878cf135793b5a5a85e10ff2f1dd351cccfa2818fb588015ff3" }, "downloads": -1, "filename": "pypette-0.0.9.tar.gz", "has_sig": false, "md5_digest": "49bb778f057a4d958b77b2042c0f7b13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8990, "upload_time": "2018-05-30T15:11:47", "url": "https://files.pythonhosted.org/packages/44/82/6cad141d27650fc2211aa85876bb00d84878bbc70bfbfad25a4d4dcd1326/pypette-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "49bb778f057a4d958b77b2042c0f7b13", "sha256": "ad58c77f8929a878cf135793b5a5a85e10ff2f1dd351cccfa2818fb588015ff3" }, "downloads": -1, "filename": "pypette-0.0.9.tar.gz", "has_sig": false, "md5_digest": "49bb778f057a4d958b77b2042c0f7b13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8990, "upload_time": "2018-05-30T15:11:47", "url": "https://files.pythonhosted.org/packages/44/82/6cad141d27650fc2211aa85876bb00d84878bbc70bfbfad25a4d4dcd1326/pypette-0.0.9.tar.gz" } ] }