{ "info": { "author": "Kapil Thangavelu", "author_email": "kapil.foss@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Zope3", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application" ], "description": "ore.wsgiapp\n-----------\n\nThis packages allows one to bootstrap a zope3 environment as a wsgi\napplication without a ZODB.\n\nUsers of this package instead register the root object to be published\nas an IApplication utility, which is looked up and returned by the\ndefault publication. All object publishing/traversal continues on from \nthis user defined root object.\n\nIn addition, this package supports standard zope3 zcml loading, and debug features.\n\nUsage\n-----\n\nA brief tutorial in using ore.wsgiapp to construct applications\n\n\nDefine an Application\n=====================\n\n\nFirst we need to define an object which implements IApplication, which will\nbe the root of our published application, useful base classes for this purpose \nare in the ore.wsgiapp.app module.\n\n >>> from ore.wsgiapp import app\n >>> class MyApplication( app.Application ): pass\n\nnow if we register this object as a utility it will be the root object\npublished by zope.\n\n >>> provideUtility( MyApplication )\n \nyou will still need to provide views, subobjects, etc.\n \nPaste Configuration\n===================\n\nTo use with Paste, you include a configuration section like::\n\nwhere:\n\n [app:zope]\n use = egg:ore.wsgiapp\n zcml = test.zcml\n \nApplication\n===========\n\nIts often useful to defer application setup till after the application has finished loading its \nconfiguration, so that component architecture is fully configured. in order to allow for this, ore.wsgiapp\ngenerates a IWSGIApplicationCreatedEvent with the application as an attribute. we can register a subscriber\nfor this in zcml, and it will be invoked after configuration is loaded. \n\nAs an example we'll use an event subscriber to \n\n >>> from zope.app.component import site\n >>> from zope.app.container.sample import SampleContainer\n >>>\n >>> def appSetUp( app, eventevent ):\n ... \"\"\"Initialize an application\"\"\"\n ...\n ... # setup a local site manager\n ... sm = site.LocalSiteManager( self.context )\n ... self.context.setSiteManager( sm )\n ...\n ... # add a folder\n ... app['news'] = SampleContainer()\n\n \nPDB Debug Mode\n==============\n\nA useful facility for application development supported by ore.wsgiapp is to allow the application\nto automatically drop into a post mortem debugging session, in the python debugger, on an unhandled\nexception in the application. ore.wsgiapp supports pdb debug mode, simply by turning on the developer\nmode configuration. The developer mode also enables other features in the zope stack, such as automatic\nreloading of page templates, etc.\n\n [app:main]\n use = egg:zope.publisher\n publication = egg:zope.publisher#sample\n foo = bar\n\nDetailed example\n================\n\nThere's a sample application class in ore.wsgiapp.tests.TestApp, along with a simple default view\nore.wsgiapp.tests.AppView. We setup \n\n >>> test_zcml_contents\n\nWe can create a WSGI application for this application by calling the ore.wsgiapp paste application\nfactory. This app accepts zcml keyword arg to point to a initial application configuration, and a devmode boolean switch. We'll get the factory by looking it up with package resources:\n\n >>> import pkg_resources\n >>> app_factory = pkg_resources.load_entry_point(\n ... 'ore.wsgiapp', 'paste.app_factory', 'main')\n \n >>> app = app_factory(dict(global_option=42), \n ... zcml=test_zcml_path)\n\n\nWe can perform a test web request by calling the app factory with an\nenvironment dictionary and a start-response function:\n\n >>> def start_response(status, headers):\n ... print status\n >>> import cStringIO\n >>> env = {'CONTENT_TYPE': 'text/plain', 'PATH_INFO': '/',\n ... 'REQUEST_METHOD': 'GET', 'wsgi.input': cStringIO.StringIO('')}\n\n >>> for data in app(env, start_response):\n ... print data,\n ... # doctest: +NORMALIZE_WHITESPACE\n 200 Ok\n Hello World\n\n\n0.3.2 - May 1st, 2008 \n\n- additional documentation and tests\n\n0.3.1 - January 10th, 2008\n\n- add app open event to hook setup after configuration loading\n\n0.3 - January 9th, 2008\n\n- First Public Release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "", "license": "ZPL", "maintainer": null, "maintainer_email": null, "name": "ore.wsgiapp", "package_url": "https://pypi.org/project/ore.wsgiapp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ore.wsgiapp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/ore.wsgiapp/0.3.2/", "requires_dist": null, "requires_python": null, "summary": "glue for wsgi zope3 apps w/o zodb", "version": "0.3.2" }, "last_serial": 795835, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "1b3c24fa2e580bd879dac5aad4c58133", "sha256": "4aa9f1ddbf37837f9e63a0c410951117d7fcf46e27974b500822376bda934d9e" }, "downloads": -1, "filename": "ore.wsgiapp-0.3-py2.5.egg", "has_sig": false, "md5_digest": "1b3c24fa2e580bd879dac5aad4c58133", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 11598, "upload_time": "2008-01-09T20:47:17", "url": "https://files.pythonhosted.org/packages/7f/98/f5f0d6ccaba318fa4664d04a6a1edba17e1a1485c85b8be27afefec149f1/ore.wsgiapp-0.3-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "efddfb1800fe25f22caa2a58c7e86c7d", "sha256": "b9f696fd42fcd8774b5543dcc3fc895cf229f9544eaa610248c469db0b6ca829" }, "downloads": -1, "filename": "ore.wsgiapp-0.3.tar.gz", "has_sig": false, "md5_digest": "efddfb1800fe25f22caa2a58c7e86c7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4079, "upload_time": "2008-01-09T20:48:26", "url": "https://files.pythonhosted.org/packages/0c/e4/45e8e5d5d926a8d6d15e01a6e36224b310fbee33a719163838b8d79e7c63/ore.wsgiapp-0.3.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "3d068a2b8fcd0434c33ec04c55c8b12b", "sha256": "2b4d43896770fdf15a2156c8c01f401ce7ee976db6407c7ce18f3d1934cb3ea3" }, "downloads": -1, "filename": "ore.wsgiapp-0.3.2-py2.5.egg", "has_sig": false, "md5_digest": "3d068a2b8fcd0434c33ec04c55c8b12b", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 17676, "upload_time": "2008-05-01T14:29:33", "url": "https://files.pythonhosted.org/packages/bd/bc/48ea26daeec4eaadebe9673e9619e4eaacfd15298459cc6ffe4dac4341c9/ore.wsgiapp-0.3.2-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "b1abb04e466f0a538c8ba78c33a9d499", "sha256": "acf635062f681e024aed6f27926b9e03a3017744e02a4fba43dc0af3edba8478" }, "downloads": -1, "filename": "ore.wsgiapp-0.3.2.tar.gz", "has_sig": false, "md5_digest": "b1abb04e466f0a538c8ba78c33a9d499", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7326, "upload_time": "2008-05-01T14:29:34", "url": "https://files.pythonhosted.org/packages/99/bd/92882294ae1efccd70825b8f36ca41b55e6fe1b9004537f07d6edb362d9e/ore.wsgiapp-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3d068a2b8fcd0434c33ec04c55c8b12b", "sha256": "2b4d43896770fdf15a2156c8c01f401ce7ee976db6407c7ce18f3d1934cb3ea3" }, "downloads": -1, "filename": "ore.wsgiapp-0.3.2-py2.5.egg", "has_sig": false, "md5_digest": "3d068a2b8fcd0434c33ec04c55c8b12b", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 17676, "upload_time": "2008-05-01T14:29:33", "url": "https://files.pythonhosted.org/packages/bd/bc/48ea26daeec4eaadebe9673e9619e4eaacfd15298459cc6ffe4dac4341c9/ore.wsgiapp-0.3.2-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "b1abb04e466f0a538c8ba78c33a9d499", "sha256": "acf635062f681e024aed6f27926b9e03a3017744e02a4fba43dc0af3edba8478" }, "downloads": -1, "filename": "ore.wsgiapp-0.3.2.tar.gz", "has_sig": false, "md5_digest": "b1abb04e466f0a538c8ba78c33a9d499", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7326, "upload_time": "2008-05-01T14:29:34", "url": "https://files.pythonhosted.org/packages/99/bd/92882294ae1efccd70825b8f36ca41b55e6fe1b9004537f07d6edb362d9e/ore.wsgiapp-0.3.2.tar.gz" } ] }