{ "info": { "author": "Ivan Dmitrievsky", "author_email": "ivan.dmitrievsky+python@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "Midware\n=======\n\nA simple general-purpose middleware library for Python 3.5 or greater.\n\nOften the main task of a program can\nbe represented as one function with rather\nstraightforward input and output. But a lot of\nunrelated code needs to be added to make this one function\ndoing one main task into an actual usable utility that,\nfor example, handles user input correctly.\n\nOne way to decomplect unrelated concerns in a program is a middleware pattern.\n\nMiddleware puts functions and composability first. To make it\neasier for functions with different signatures to be composable all\narguments are usually packed into one dictionary called `ctx` for \"context\".\nAll functions take `ctx` as an argument, modify it and return it.\n\nFunctions that modify the `ctx` are called handlers. Handlers are already\nvery composable by design and one can easily pipe `ctx` values through\na series of handlers, but that's often not enough. One of the most frequently\nused patterns (a lot of languages even have built-in keywords for it, Python has several actually)\nis the \"setup-teardown\" pattern. That is where middleware comes in.\n\nMiddleware is a higher-order function that takes a handle and return a new handle,\nwhich typically wraps the old one. It does some work, maybe modifies the `ctx`,\npasses it to the old handle, gets a new `ctx` back and optionally does\nsomething else before returning.\n\nOnce again, middleware is composable, because it takes handles and returns handles.\nWhen using middleware as building blocks, composing those returns an outermost handle,\nwhich needs to be called with a `ctx` value as an argument to kick off the computation.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/idmit/midware", "keywords": "", "license": "MIT License\n\nCopyright (c) 2017 Ivan Dmitrievsky\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", "maintainer": "", "maintainer_email": "", "name": "midware", "package_url": "https://pypi.org/project/midware/", "platform": "", "project_url": "https://pypi.org/project/midware/", "project_urls": { "Homepage": "https://github.com/idmit/midware" }, "release_url": "https://pypi.org/project/midware/0.5.1/", "requires_dist": null, "requires_python": "", "summary": "A simple general-purpose middleware library for Python", "version": "0.5.1" }, "last_serial": 3152833, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1b3cdc33ea3ff19e7959a6d03230675f", "sha256": "2fdff9ef2f23c5c92d97bb4320e0e20533a45a4ff9a50ef7a8aaec7ba11125f6" }, "downloads": -1, "filename": "midware-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1b3cdc33ea3ff19e7959a6d03230675f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3981, "upload_time": "2017-08-18T15:03:39", "url": "https://files.pythonhosted.org/packages/8a/3a/e13c420bcecff6bc238be35049cf9c455cb6106048c8aec195fb1f93315a/midware-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6354f907be35f5f3291a1db70b3e6084", "sha256": "4d5ac2f9bfdb76960ba3fcc144ca311c4156e39ca4bf7c96c8f156d917983150" }, "downloads": -1, "filename": "midware-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6354f907be35f5f3291a1db70b3e6084", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4002, "upload_time": "2017-08-18T15:23:03", "url": "https://files.pythonhosted.org/packages/d6/be/5734eb2eb0a3edac00ceaf543020d81d1fc0271a46e04c4f5bf4d2a94818/midware-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5d97fed0efab9f74e4461e9221a8197f", "sha256": "228ad22badd3d3a01a61789428fe57c38a32be5ef793ee55e50793c2f23743ab" }, "downloads": -1, "filename": "midware-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5d97fed0efab9f74e4461e9221a8197f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3968, "upload_time": "2017-08-18T15:27:08", "url": "https://files.pythonhosted.org/packages/aa/69/5b8b5c7071964ff19080b686bb0dfe0094760abbf88fae2c0b55da73ba09/midware-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7fbed3817e9543e85d0719beefd90e77", "sha256": "08c5469203e46fe02e4da3b3a3f423de62e719a3380d0574f46614f17dd3a448" }, "downloads": -1, "filename": "midware-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7fbed3817e9543e85d0719beefd90e77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3972, "upload_time": "2017-08-18T15:30:07", "url": "https://files.pythonhosted.org/packages/63/ec/9c948a78a2cdcd993d79de1721dc49a7fd9524b0f62308ccc64e849e094d/midware-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "930181116d1d26e3d59b7988ad426b31", "sha256": "a2c8774fff3a2377b568e90ef3bc30e4920f9383169941e4aaa402a8472122eb" }, "downloads": -1, "filename": "midware-0.1.4.tar.gz", "has_sig": false, "md5_digest": "930181116d1d26e3d59b7988ad426b31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4188, "upload_time": "2017-08-18T15:31:48", "url": "https://files.pythonhosted.org/packages/52/61/1dc2c0105f654771651e019bab6c9f4d4ee411071100fa3ab0b392644622/midware-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "0f729e9e9507fa5c8370cab84b592bb1", "sha256": "aa1c4f003762506ff944230318a84c907844847037a7b1141edfe7f8462c951f" }, "downloads": -1, "filename": "midware-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0f729e9e9507fa5c8370cab84b592bb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4099, "upload_time": "2017-08-18T17:32:23", "url": "https://files.pythonhosted.org/packages/d2/cc/ca69b344daf14a8e673c81e7df5f3ebc9a2ac9276ab2efde353b365b6c99/midware-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "3b81b1e63c513a11ebf5949b9a3a69fc", "sha256": "fc56e504abfc52d6aa8c61c5a61728ed428f340b1d1939b90eee35e9a42a1892" }, "downloads": -1, "filename": "midware-0.2.1.tar.gz", "has_sig": false, "md5_digest": "3b81b1e63c513a11ebf5949b9a3a69fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4115, "upload_time": "2017-08-18T17:38:30", "url": "https://files.pythonhosted.org/packages/13/38/b6d9da7ed0a612147cabb4d1b2034c47b42efa861b99f30e2fd581f2bf1c/midware-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "029c09555b21da70b8baad1a50ead0f2", "sha256": "2c10ab34f8ad61ec599aa1db3f654161d9973263c3e94d0ac70992ecdfb04499" }, "downloads": -1, "filename": "midware-0.3.0.tar.gz", "has_sig": false, "md5_digest": "029c09555b21da70b8baad1a50ead0f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5004, "upload_time": "2017-08-26T21:38:30", "url": "https://files.pythonhosted.org/packages/7b/c3/78a9817465b8277a5539c12b201e2aae9c8491ee471ef6f2097274a3b40c/midware-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "1e100d55b656e1f6db785566e9cd1949", "sha256": "78895c5a788d7ba79df21f792e47110cf28bba7b2899acd09f5c16bed7c4a076" }, "downloads": -1, "filename": "midware-0.4.0.tar.gz", "has_sig": false, "md5_digest": "1e100d55b656e1f6db785566e9cd1949", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5157, "upload_time": "2017-08-28T19:30:22", "url": "https://files.pythonhosted.org/packages/6f/b7/c80a4c246c8662b357adcff85fc64bed0d488aadaa5476039b660b9915bf/midware-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "8e77c6fc456ed61f5893935acf82c135", "sha256": "400be216043b5d8e04e614b07c0c8af3c1df56bbbe175a73383e6b817bdde665" }, "downloads": -1, "filename": "midware-0.5.0.tar.gz", "has_sig": false, "md5_digest": "8e77c6fc456ed61f5893935acf82c135", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4644, "upload_time": "2017-09-05T21:08:56", "url": "https://files.pythonhosted.org/packages/21/6a/7f19a5d424c25cd4ae888d441ba935a74621fb926a546ea2e5f2c509919f/midware-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "f27d533c11737ba62adc3b976dd8517d", "sha256": "5a088cffe5a05f6ac1c80dbba05bcfdbb554ed13a12c3da32121471482357020" }, "downloads": -1, "filename": "midware-0.5.1.tar.gz", "has_sig": false, "md5_digest": "f27d533c11737ba62adc3b976dd8517d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4675, "upload_time": "2017-09-06T09:20:56", "url": "https://files.pythonhosted.org/packages/7f/7f/e27bde9e077a29cca16573b178b3642915e563431306c2333facdc0f3af2/midware-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f27d533c11737ba62adc3b976dd8517d", "sha256": "5a088cffe5a05f6ac1c80dbba05bcfdbb554ed13a12c3da32121471482357020" }, "downloads": -1, "filename": "midware-0.5.1.tar.gz", "has_sig": false, "md5_digest": "f27d533c11737ba62adc3b976dd8517d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4675, "upload_time": "2017-09-06T09:20:56", "url": "https://files.pythonhosted.org/packages/7f/7f/e27bde9e077a29cca16573b178b3642915e563431306c2333facdc0f3af2/midware-0.5.1.tar.gz" } ] }