{ "info": { "author": "made.com", "author_email": "dev@made.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Pyppo\n=====\n\n\nPyppo is a simple flow base programming micro framework for Python.\n\n\nExamples\n--------\n\n\nSimple pipeline\n+++++++++++++++\n\nThis is an example of a very simple `pipeline`. Simply pass a list functions\nto be executed at the pipeline execution.\n\n.. code-block:: python \n \n obj = []\n\n def do_something(obj):\n obj.append(1)\n return obj\n\n def do_something_else(obj):\n obj.append(2)\n return obj\n\n consume(pipeline([obj], [do_something, do_something_else]))\n\n print(obj)\n [1, 2]\n\n\n\n\nFork pipeline\n+++++++++++++\n\nThis example shows a fork of a pipeline. `fork` is essentially another\npipeline steps except it acceptes a list of function branches.\n\n.. code-block:: python\n \n obj = []\n def first_step(obj):\n obj.append(1)\n return obj\n \n def branch_add_two(obj):\n obj.append(2)\n return obj\n \n def branch_add_four(obj):\n obj.append(4)\n return obj\n \n pipeline([obj], first_step, fork([branch_add_two], [branch_add_four]))\n \n\nValidate pipeline steps\n+++++++++++++++++++++++\n\nYou can also validate pipeline steps by providing a validate function\nto the `validate_with` decorator as shown on the following example\n\n\n.. code-block:: python \n \n validation = lambda entry: 'x' in entry \n \n def add_x_to_entry(entry):\n # should add 'x' key to entry dictionary but didn't\n return entry\n \n @validate_with(validation)\n def increment_1_on_x_key(entry):\n entry['x'] += 1\n return entry\n \n entry = {}\n # consume will saise a StepValidationError\n consume(pipeline([entry], [add_x_to_entry, increment_1_on_x_key]))\n\n", "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/madedotcom/pyppo/", "keywords": "made.com,pipeline,flow,based,functional", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "Pyppo", "package_url": "https://pypi.org/project/Pyppo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Pyppo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/madedotcom/pyppo/" }, "release_url": "https://pypi.org/project/Pyppo/0.1/", "requires_dist": null, "requires_python": null, "summary": "Pyppo is a small flow based programming micro framework", "version": "0.1" }, "last_serial": 1801081, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "64ed7cf7b8162612696cc4cd8b9e05e7", "sha256": "c829e4470a392f70394b30f8090a429b4c9302cf1402b525610c474794526954" }, "downloads": -1, "filename": "Pyppo-0.1.tar.gz", "has_sig": false, "md5_digest": "64ed7cf7b8162612696cc4cd8b9e05e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2977, "upload_time": "2015-11-04T17:16:59", "url": "https://files.pythonhosted.org/packages/a1/05/27a1787d0aa95e6a69de95690b03ae4d4c23bd5b9cf036513950be5c7c9d/Pyppo-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "64ed7cf7b8162612696cc4cd8b9e05e7", "sha256": "c829e4470a392f70394b30f8090a429b4c9302cf1402b525610c474794526954" }, "downloads": -1, "filename": "Pyppo-0.1.tar.gz", "has_sig": false, "md5_digest": "64ed7cf7b8162612696cc4cd8b9e05e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2977, "upload_time": "2015-11-04T17:16:59", "url": "https://files.pythonhosted.org/packages/a1/05/27a1787d0aa95e6a69de95690b03ae4d4c23bd5b9cf036513950be5c7c9d/Pyppo-0.1.tar.gz" } ] }