{ "info": { "author": "Leonardo Rochael Almeida", "author_email": "leorochael@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Zope2", "Intended Audience :: System Administrators", "Programming Language :: Python" ], "description": "Introduction\n============\n\nThis Zope add-on product provides for easy configuration of ZServer Views.\n\nIt was authored by Leonardo Rochael Almeida, and sponsored by OpenMultimedia.\n\nA ZServer View is a (supposedly) small and fast WSGI_ application that runs\ndirectly from within the ZServer thread (a.k.a. medusa thread).\n\nThis means that a ZServer View will run even if all Zope worker-threads are\nbusy handling other requests. It also means that if a ZServer View is not fast,\nthen it is blocking the ZServer from handling incoming requests for all worker\nthreads, so be mindful when using this product.\n\nZServer Views are mostly useful for system monitoring tools, like\n`DeadlockDebugger` or Zope resource monitoring.\n\nInstallation\n============\n\nAdd `Products.ZServerViews` to the list of eggs of the part that defines your\nZope instance.\n\nConfiguration\n=============\n\nAdd a `product-config` section for `zserver-views` to your Zope\nconfiguration (e.g. the `zope.conf` file or a `zope-conf-additional` parameter\nin your buildout configuration).\n\nEach entry in this section should contain an identifier (must be unique within\nthe section but are currently unused [1]_), a URL path and the dotted\nname of the view which will be served from that URL path, all separated by\nwhitespace. For example::\n\n \n my-package /my/view my.package.mymodule.my_view\n thread-id /thr-id Products.ZServerViews.tests.common.current_thread_id_zserver_view\n \n\nThis means that the `http://yourserver/my/view` URL will run the WSGI app at\n`my.package.mymodule.my_view` and the url at `http://yourserver/thr-id` will\nrun the `Products.ZServerViews.tests.common.current_thread_id_zserver_view`\nWSGI view.\n\nQuery strings, if present, will be passed to the ZServer Views, but sub-paths\nwill not. I.e., `http://yourserver/my/view?foo=bar` will run\n`my.package.mymodule.my_view`, but `http://yourserver/thrid/fred` will not run\nthe `Products.ZServerViews.tests.common.current_thread_id_zserver_view` view,\nbut will be handled by Zope directly.\n\nThis behaviour is intentional, and reflects the fact that ZServer View location\nis decided by a single dictionary lookup, instead of multiple regex or\nsubstring matching.\n\n.. [1] The identifiers in `product-config` keys cannot be composed\n of many valid URL characters, and are forcibly lower-cased, so they're\n useless for either the URL or the dotted name of the view.\n\nWriting ZServer Views\n=====================\n\nZServer Views are mini WSGI apps, which mean they take an `env` and a\n`start_response` parameter, and return the bytes that must be\nsent to the browser. The query string, if any, will be passed into\n`env['QUERY_STRING']`.\n\nFor HTTP/1.1 compatibility they must either pass a \"Content-Lenght\" header into\n`start_response()` or a \"Transfer-Encoding=chunked\" header and chunk the\ncontent. If neither is done, the response will fall back to `HTTP/1.0`\nautomatically, and the connection will be forced close.\n\nTo ease the creation of these mini apps, a decorator exists\n(`Products.ZServerViews.base import TextView`) that can wrap\na function receiving only the `env` parameter and returns a single `unicode`\nstring. This decorator will take care of all the WSGI conversation around that\nresponse.\n\nCheck `Products.ZServerViews.tests.common.current_thread_id_zserver_view` for\nan example.\n\n.. _WSGI: http://wsgi.org/\n\nChangelog\n=========\n\n0.2.0 (2013-01-24)\n------------------\n\n- Make the message of ViewError a mandatory parameter. It can be empty but lots\n of HTTP error codes require a body in the response, so an empty body is no\n longer the default [leorochael]\n\n- Add a modicum of Python 2.4/Zope 2.10 compatibility (Exceptions are not\n new-style classes) [leorochael]\n\n0.1.1 (2013-01-18)\n------------------\n\n- Include .rst files in the manifest [leorochael]\n\n\n0.1.0 (2013-01-18)\n------------------\n\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/Products.ZServerViews", "keywords": "zope2 plone", "license": "ZPL", "maintainer": null, "maintainer_email": null, "name": "Products.ZServerViews", "package_url": "https://pypi.org/project/Products.ZServerViews/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Products.ZServerViews/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/Products.ZServerViews" }, "release_url": "https://pypi.org/project/Products.ZServerViews/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Provide infrastructure for plugging views that run directly at the ZServer\nthread", "version": "0.2.0" }, "last_serial": 785151, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "8b9b7f07c15c305748377304f07c6cf2", "sha256": "6dac1fb3abcae9629b5330fedbdb00da4fae55a270e2310074ba7c15f719170c" }, "downloads": -1, "filename": "Products.ZServerViews-0.1.0.zip", "has_sig": false, "md5_digest": "8b9b7f07c15c305748377304f07c6cf2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18732, "upload_time": "2013-01-18T14:22:10", "url": "https://files.pythonhosted.org/packages/9b/39/b6d23e434e8e5a1839205ed36aacf6c7415e979fff46580565c8885a69f7/Products.ZServerViews-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ec2dc36aeb9d9fa66cb83d3760ae44d5", "sha256": "d31ef2129021a69102271514de337dc0e4aa0b2252cb32891b6f6cd02c770b3f" }, "downloads": -1, "filename": "Products.ZServerViews-0.1.1.zip", "has_sig": false, "md5_digest": "ec2dc36aeb9d9fa66cb83d3760ae44d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20502, "upload_time": "2013-01-18T17:08:22", "url": "https://files.pythonhosted.org/packages/3d/73/7547a21b63ae9c3c30aa0f8bce9c4dcf55992350a5ebb6cb6d3e2708cf43/Products.ZServerViews-0.1.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "dcff2636e8bebc5ba6a49e4341249203", "sha256": "0f2d7ce9f424b5352a45a60a8659a7fb519cef30ed8ac4182a5f0752f5088009" }, "downloads": -1, "filename": "Products.ZServerViews-0.2.0.zip", "has_sig": false, "md5_digest": "dcff2636e8bebc5ba6a49e4341249203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21012, "upload_time": "2013-01-24T18:10:38", "url": "https://files.pythonhosted.org/packages/51/b9/82576a827b1c16b3c92d841c8fd52a59df846da8166132ea7c4290d62c4c/Products.ZServerViews-0.2.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dcff2636e8bebc5ba6a49e4341249203", "sha256": "0f2d7ce9f424b5352a45a60a8659a7fb519cef30ed8ac4182a5f0752f5088009" }, "downloads": -1, "filename": "Products.ZServerViews-0.2.0.zip", "has_sig": false, "md5_digest": "dcff2636e8bebc5ba6a49e4341249203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21012, "upload_time": "2013-01-24T18:10:38", "url": "https://files.pythonhosted.org/packages/51/b9/82576a827b1c16b3c92d841c8fd52a59df846da8166132ea7c4290d62c4c/Products.ZServerViews-0.2.0.zip" } ] }