{ "info": { "author": "Tom Lynn and Chris Perkins", "author_email": "chris@percious.com", "bugtrack_url": null, "classifiers": [], "description": "Provides middleware for detecting and correcting errors in web pages that are\nserved via the standard WSGI protocol used by most Python web frameworks.\nBy default, validation errors are logged to the \"strainer.middleware\" channel\nusing the standard Python logging module.\n\nYou should read the documentation for your web framework to find out how to\nget the \"WSGI application\" that is responsible for serving your web site.\nIn Pylons, for example, the following code could be added in the\n``config/middleware.py`` file.\n\nTo add HTML/XHTML/XML well-formedness validation to your WSGI app::\n\n >>> from strainer.middleware import WellformednessCheckerMiddleware\n >>> app = WellformednessCheckerMiddleware(app)\n\nThis uses the expat parser to detect most syntax errors and mismatched tags, \nbut it won't perform stricter checks that the document structure matches the \nXHTML DTD, such as detecting disallowed child tags or attributes. For that \nyou should install a recent version of lxml (e.g. \"easy_install lxml\") and \nuse XHTMLValidatorMiddleware instead, with code such as::\n\n >>> from strainer.middleware import XHTMLValidatorMiddleware\n >>> app = XHTMLValidatorMiddleware(app)\n\nTo add JSON validation to your WSGI app::\n\n >>> from strainer.middleware import JSONValidatorMiddleware\n >>> app = JSONValidatorMiddleware(app)\n\nIf your web framework doesn't provide an alternative handler for the error \nmessages that are logged to the \"strainer.middleware\" channel, you can have \nthem printed to sys.stderr with::\n\n >>> import logging\n >>> logging.basicConfig()\n\nTo add automatic correction of common HTML and XHTML errors to your WSGI app::\n\n >>> from strainer.middleware import XHTMLifyMiddleware\n >>> app = XHTMLifyMiddleware(app)\n\nThis is somewhat experimental, but it will improve faster if people use it \nand email us bug reports...\n\nAs with all (or at least most) WSGI middleware, you can also combine them::\n\n >>> app = XHTMLifyMiddleware(app)\n >>> app = XHTMLValidatorMiddleware(app)\n >>> app = JSONValidatorMiddleware(app)\n\nThe middleware in this package buffer the output internally (this violates\nthe PEP 333 specification, but it seems unavoidable), so it is best to use \nthem near the top of the middleware stack.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "html xhtml json wsgi", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "strainer", "package_url": "https://pypi.org/project/strainer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/strainer/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/strainer/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Tools to allow developers to cleanup web serialization objects (HTML, JSON, XHTML)", "version": "0.1.4" }, "last_serial": 800146, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7e22aaabd50f222f76fc9c6e880696af", "sha256": "da55054786c7da6bd78c819533afa2678d002b6d6ca4b39d036d1c918814bcad" }, "downloads": -1, "filename": "strainer-0.1-py2.6.egg", "has_sig": false, "md5_digest": "7e22aaabd50f222f76fc9c6e880696af", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 82150, "upload_time": "2010-11-16T21:55:28", "url": "https://files.pythonhosted.org/packages/17/08/0381172d445857cf7a25b52ce5289f9ffe91629c3f9280c5e3229670cfa0/strainer-0.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "942be62f0f1e864cfe1b08d261a0953b", "sha256": "5a97edc5f787fcc05626fddfb3129ffa4a7ce74313be1cd1d6b7d6f66e5b2b55" }, "downloads": -1, "filename": "strainer-0.1.tar.gz", "has_sig": false, "md5_digest": "942be62f0f1e864cfe1b08d261a0953b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21047, "upload_time": "2010-11-16T21:55:26", "url": "https://files.pythonhosted.org/packages/cd/d3/8342cc44c5ff1948b2afc5e1491548867db24d33126a409fc4a70a1baf1e/strainer-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7180e0b50978959e8bc826d65a292f09", "sha256": "fcc28498f3bef5bc39b8755efa6067ae54e47e10e244e42197af1b318dca6a86" }, "downloads": -1, "filename": "strainer-0.1.1-py2.6.egg", "has_sig": false, "md5_digest": "7180e0b50978959e8bc826d65a292f09", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 82143, "upload_time": "2010-11-16T23:32:27", "url": "https://files.pythonhosted.org/packages/f0/37/68185c4c50ed9b5d268cda00bd8bc4528b285339ff2aec7475a025d34a70/strainer-0.1.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "bfc51de160b481f4b6fa0668940c7a39", "sha256": "6de9dd4a9fb95e60b63d7de612db899a3214690a6f71ee450a0abbcf266f1af0" }, "downloads": -1, "filename": "strainer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "bfc51de160b481f4b6fa0668940c7a39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21058, "upload_time": "2010-11-16T23:32:26", "url": "https://files.pythonhosted.org/packages/92/23/ba9052a33e948ee39e3f58dd94820474e374c9333930c7f5ce3ac94d876b/strainer-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "959cf08380581321f9dcace084011cb6", "sha256": "79be695f7bd3352e4cbe6b08007039c83332d0988db84c76f2d60bcf903ff9dd" }, "downloads": -1, "filename": "strainer-0.1.2-py2.6.egg", "has_sig": false, "md5_digest": "959cf08380581321f9dcace084011cb6", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 82140, "upload_time": "2010-12-23T19:29:25", "url": "https://files.pythonhosted.org/packages/02/1f/9ef5c32105ce7fe2303566a00cfc402358a3c16763ef21442b1a1f99d2ab/strainer-0.1.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "5576ab4475319e6e573b7f25a96941f5", "sha256": "241c5560a86ac317ecfed9e719731402a46fd2aeee8e82f515908799613abdce" }, "downloads": -1, "filename": "strainer-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5576ab4475319e6e573b7f25a96941f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21056, "upload_time": "2010-12-23T19:29:24", "url": "https://files.pythonhosted.org/packages/bd/b4/50cbfbe281639effb23cf2cf8da38a652bb8fba4e9e91e8b2cfd6fff47fb/strainer-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "300215e30f7fc5ea22b9020c2c48e0ae", "sha256": "f95aa435e5d397d0d06ff5e767cefcb00cb8ccfb1c91e7f27a87c53c54a401d1" }, "downloads": -1, "filename": "strainer-0.1.3-py2.6.egg", "has_sig": false, "md5_digest": "300215e30f7fc5ea22b9020c2c48e0ae", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 84836, "upload_time": "2010-12-29T23:18:47", "url": "https://files.pythonhosted.org/packages/9b/90/0ea3c630b0ebeeed5abc903891351d64f6553bfa344873b6c4909fb6a6c6/strainer-0.1.3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "66aa49f0575443d133fa3ae46bd59e08", "sha256": "93998812ab902a7541990471293be8a74523c26104cf34fd27c6ea7453caa453" }, "downloads": -1, "filename": "strainer-0.1.3.tar.gz", "has_sig": false, "md5_digest": "66aa49f0575443d133fa3ae46bd59e08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22087, "upload_time": "2010-12-29T23:18:45", "url": "https://files.pythonhosted.org/packages/a4/30/c6871341dfc5e317825ac5ac38dc32d67ab59e4bb1564f5c61fbbc26cfed/strainer-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2e9283c984d19427ff005e8eb880ac3b", "sha256": "7174ca16dab81397cd57387ae4c13ed21038d26a6f135caec224c0b17d34d485" }, "downloads": -1, "filename": "strainer-0.1.4-py2.6.egg", "has_sig": false, "md5_digest": "2e9283c984d19427ff005e8eb880ac3b", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 85228, "upload_time": "2011-03-21T06:34:11", "url": "https://files.pythonhosted.org/packages/69/bc/702d65d61ba5d3fc8df7024f57e54fd1c9a64341787db25b5d4538be18d8/strainer-0.1.4-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "5894adf6e0ea38f2c5e8bba2ae722448", "sha256": "04d264a0ed2cc206a719e61813474c310473fa1eaba53e193421ec5d1420019c" }, "downloads": -1, "filename": "strainer-0.1.4.tar.gz", "has_sig": false, "md5_digest": "5894adf6e0ea38f2c5e8bba2ae722448", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22152, "upload_time": "2011-03-21T06:34:09", "url": "https://files.pythonhosted.org/packages/90/4d/8aee37366e6096dd54eb420781d0b46bcbf06fbd7fde9b8780643be6ed41/strainer-0.1.4.tar.gz" } ], "0.1a1": [ { "comment_text": "", "digests": { "md5": "ae4cffeaa44468ae1d7bb09346474b81", "sha256": "269a74f28d7caa06b120623374464b2d7d3e6fc0a6c089ee19dd0a51c9b813fa" }, "downloads": -1, "filename": "strainer-0.1a1-py2.5.egg", "has_sig": false, "md5_digest": "ae4cffeaa44468ae1d7bb09346474b81", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 11860, "upload_time": "2009-08-04T23:23:21", "url": "https://files.pythonhosted.org/packages/c2/cf/22143ea61e3d3010bce6e6b53fda0042510ddafe3ab396d373c6863ca212/strainer-0.1a1-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "db78d7f9e705e9bfa379736b403e6f16", "sha256": "923c5e44e0fc5d3e20acfe96db5f12d1bd74d1c37f8ef1561c482f2cf741dc25" }, "downloads": -1, "filename": "strainer-0.1a1.tar.gz", "has_sig": false, "md5_digest": "db78d7f9e705e9bfa379736b403e6f16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5199, "upload_time": "2009-08-04T23:23:20", "url": "https://files.pythonhosted.org/packages/e3/09/660f2fa831ab1e5fa7ac335797114094bc058ca12f5a924ca06c4f9feb99/strainer-0.1a1.tar.gz" } ], "0.1a2": [ { "comment_text": "", "digests": { "md5": "5e3d938ec699aceac9ab27fc2c32919d", "sha256": "308860991aabca493c7a6e9d5cc91fe92e1678833e6210405eb8a2f1606c45d3" }, "downloads": -1, "filename": "strainer-0.1a2-py2.6.egg", "has_sig": false, "md5_digest": "5e3d938ec699aceac9ab27fc2c32919d", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 11798, "upload_time": "2009-09-13T23:59:57", "url": "https://files.pythonhosted.org/packages/ff/bc/62c2a6e8d398da19ab3fe0e68cef4392fc04611512803c32152dbe1e3736/strainer-0.1a2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "0ba0cfce24ddef0b98255d26c9f3c5b9", "sha256": "c159d61a68cdc372ef33d713a86c413afe4009eaa51b2242e001ae38d183592a" }, "downloads": -1, "filename": "strainer-0.1a2.tar.gz", "has_sig": false, "md5_digest": "0ba0cfce24ddef0b98255d26c9f3c5b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5166, "upload_time": "2009-09-13T23:59:56", "url": "https://files.pythonhosted.org/packages/63/3b/065b0c8390a6940aca6b868696b3efc299167a8f2936c66f5f5f819a42fb/strainer-0.1a2.tar.gz" } ], "0.1rc1": [ { "comment_text": "", "digests": { "md5": "0052886fb41cd2c0c5955ec0f3987621", "sha256": "d5e4bcfc4c42978f65b505fcb39be0f0e4b62aabce7e8826acb8a5e5fefb39f0" }, "downloads": -1, "filename": "strainer-0.1rc1-py2.6.egg", "has_sig": false, "md5_digest": "0052886fb41cd2c0c5955ec0f3987621", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 65291, "upload_time": "2010-01-12T21:18:28", "url": "https://files.pythonhosted.org/packages/9b/80/f83936e9ba7b3e772db4e825a4e13cace8b4a01330f29e8f217208426453/strainer-0.1rc1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "35723ccd1c9a400cb3de0efe505bcab5", "sha256": "c01049cc143bb9e68468605a5c9ee1a31e84e1edb260df23d64cf40764c38234" }, "downloads": -1, "filename": "strainer-0.1rc1.tar.gz", "has_sig": false, "md5_digest": "35723ccd1c9a400cb3de0efe505bcab5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14026, "upload_time": "2010-01-12T21:18:27", "url": "https://files.pythonhosted.org/packages/a2/69/c45060fe0e596c820b8316a7e7b4f10853b921628b60e94d83e2f6e429ce/strainer-0.1rc1.tar.gz" } ], "0.1rc3": [ { "comment_text": "", "digests": { "md5": "19e883e7709523b4be96ca931cf2faad", "sha256": "dfeb0e2331bcc6203dbbcecfe528f81185cf756a10d79719e4b4426c84d73498" }, "downloads": -1, "filename": "strainer-0.1rc3-py2.6.egg", "has_sig": false, "md5_digest": "19e883e7709523b4be96ca931cf2faad", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 81335, "upload_time": "2010-09-08T22:08:30", "url": "https://files.pythonhosted.org/packages/2e/a9/63b42df4fd76a67098832e5a5c19c0ac86db243574b1f05096f3dd4bc542/strainer-0.1rc3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "f4a8350aa323058a07765fce1adf1a65", "sha256": "99102a950b88d2e943460b9a2e7f52956fc28c289a185f30cb577b82feb7b9fd" }, "downloads": -1, "filename": "strainer-0.1rc3.tar.gz", "has_sig": false, "md5_digest": "f4a8350aa323058a07765fce1adf1a65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22021, "upload_time": "2010-09-08T22:08:28", "url": "https://files.pythonhosted.org/packages/67/ff/426c37b5e31ba9d40aa6ff5e6bc8a8984daff233851098b6af8a27f2ff77/strainer-0.1rc3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e9283c984d19427ff005e8eb880ac3b", "sha256": "7174ca16dab81397cd57387ae4c13ed21038d26a6f135caec224c0b17d34d485" }, "downloads": -1, "filename": "strainer-0.1.4-py2.6.egg", "has_sig": false, "md5_digest": "2e9283c984d19427ff005e8eb880ac3b", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 85228, "upload_time": "2011-03-21T06:34:11", "url": "https://files.pythonhosted.org/packages/69/bc/702d65d61ba5d3fc8df7024f57e54fd1c9a64341787db25b5d4538be18d8/strainer-0.1.4-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "5894adf6e0ea38f2c5e8bba2ae722448", "sha256": "04d264a0ed2cc206a719e61813474c310473fa1eaba53e193421ec5d1420019c" }, "downloads": -1, "filename": "strainer-0.1.4.tar.gz", "has_sig": false, "md5_digest": "5894adf6e0ea38f2c5e8bba2ae722448", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22152, "upload_time": "2011-03-21T06:34:09", "url": "https://files.pythonhosted.org/packages/90/4d/8aee37366e6096dd54eb420781d0b46bcbf06fbd7fde9b8780643be6ed41/strainer-0.1.4.tar.gz" } ] }