{ "info": { "author": "Andras Biczo", "author_email": "abiczo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===========\nEmulateRest\n===========\n\nWSGI middleware that does Rails style PUT and DELETE request emulation.\n\nThe middleware intercepts the wrapped application's response and looks\nfor forms with ``method=\"PUT\"`` or ``method=\"DELETE\"``. For each such form\nit replaces the value of ``method`` with \"POST\" and adds a hidden input\nfield ``_method`` that contains the original request method.\nIt also intercepts incoming requests and does the inverse transformation.\n\nWhat this all means is that you can use PUT and DELETE forms in your\nHTML code, without having to worry about browser support for these\nrequest methods.\n\nInstall\n=======\n\nYou can install EmulateRest from `PyPI `_::\n\n easy_install emulaterest\n\nor you can install the latest version from the\n`github repository `_::\n\n git clone git://github.com/abiczo/emulaterest.git\n cd emulaterest\n python setup.py install\n\nNotes\n=====\n\n* For ``text/html`` documents the default behavior is to inject HTML style\n ```` elements. You can tell EmulateRest to inject XHTML style\n ```` elements either by using the ``force_xhtml`` option or by\n serving your documents as ``application/xhtml+xml``.\n\n* If you are using a gzipping middleware or any other middleware that modifies\n the content-encoding, make sure that EmulateRest is wrapped in that\n middleware and not the other way round.\n\nExample\n=======\n\nA complete working example using `web.py `_::\n\n import web\n\n urls = ('/', 'index')\n\n class index:\n def GET(self):\n web.ctx['headers'].append(('Content-Type', 'text/html'))\n return \"\"\"PUT test
\n
\n
\n \n \n
\n
\n
\n \"\"\"\n\n def PUT(self):\n return 'PUT ' + str(web.input())\n\n if __name__ == '__main__':\n import emulaterest\n app = web.application(urls, globals())\n app.run(emulaterest.EmulateRestMiddleware)", "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/abiczo/emulaterest", "keywords": "web wsgi middleware rest", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "emulaterest", "package_url": "https://pypi.org/project/emulaterest/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/emulaterest/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/abiczo/emulaterest" }, "release_url": "https://pypi.org/project/emulaterest/0.2/", "requires_dist": null, "requires_python": null, "summary": "WSGI middleware that does Rails style PUT and DELETE request emulation", "version": "0.2" }, "last_serial": 791639, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ef04735a34826dfc095bfd2a679b2a39", "sha256": "7c5483eca9ec610c580c6b3f4a34ed014c3244ce0e6d75ffd4da63a94594064c" }, "downloads": -1, "filename": "emulaterest-0.1.tar.gz", "has_sig": false, "md5_digest": "ef04735a34826dfc095bfd2a679b2a39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4824, "upload_time": "2009-04-02T01:21:19", "url": "https://files.pythonhosted.org/packages/9d/38/b9dbac232355df0e18c9bff0cca30c61c439fb64108125d58bdd29b9f959/emulaterest-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "35b69ebe278fc1d3617653c2b12df575", "sha256": "fc7c7dbb596f4fe6925ed78f3fac20303d1fda48c6ea58aab22311ff081fbd4f" }, "downloads": -1, "filename": "emulaterest-0.2.tar.gz", "has_sig": false, "md5_digest": "35b69ebe278fc1d3617653c2b12df575", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4939, "upload_time": "2013-04-27T19:04:51", "url": "https://files.pythonhosted.org/packages/5e/da/caf9bebbdb431c2d53bb2d15ad26429f7c75d79f50b83f6eb3c1a49aba77/emulaterest-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "35b69ebe278fc1d3617653c2b12df575", "sha256": "fc7c7dbb596f4fe6925ed78f3fac20303d1fda48c6ea58aab22311ff081fbd4f" }, "downloads": -1, "filename": "emulaterest-0.2.tar.gz", "has_sig": false, "md5_digest": "35b69ebe278fc1d3617653c2b12df575", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4939, "upload_time": "2013-04-27T19:04:51", "url": "https://files.pythonhosted.org/packages/5e/da/caf9bebbdb431c2d53bb2d15ad26429f7c75d79f50b83f6eb3c1a49aba77/emulaterest-0.2.tar.gz" } ] }