{ "info": { "author": "whit morriss and matt george", "author_email": "whit at nocoast dot us", "bugtrack_url": null, "classifiers": [], "description": "=====\n wee\n=====\n\nYou could call it Webob augmented `itty\n`_ . It borrows it's form but\nallow for the use of a passed in Request or Response object. By\ndefault, it uses the Request and Response from WebOb, as well as WebOb's.\n\n\nWhy?\n====\n\nWe were working with `itty` and hit our head a few times. We really\nliked the way it worked though and thought we might fit it with our\nfavorite request and response objects. 106 lines later, wee was born\nas the dispatcher for a wsgi app.\n\n\nBasic Usage\n===========\n\nHere is a super simple pony app to show the basics of wee. Pretty\nmuch the same as itty except we use full regex strings::\n\n import wee\n from wsgiref.simple_server import make_server\n\n @wee.get(r'^/$')\n def ponytime(request):\n return \"It's Pony time!\"\n\n\n @wee.post(r'^/$'):\n def make_pony(request):\n ... make a pony ...\n\n\n @wee.put('^/(?P\\w+)$'):\n def add_unicorn_horn(request, pony_name=None):\n ... change a pony ...\n\n\n @wee.delete('^/(?P\\w+)$'):\n def kill_a_pony(request, pony_name):\n ... delete a pony ...\n\n srv = make_server(host, port, wee.make_app())\n srv.serve_forever()\n\n\nUsing a prefix\n==============\n\nSometimes you want to hang a wee app on an existing app tree::\n\n import wee\n\n @wee.get('^/$')\n def logical_root(request):\n return \"I'm an index\"\n\n registry = wee.PrefixRegistry(prefix='/my/crazy/existing/dispatch/tree')\n\n wee.make_app(registry=prefix)\n\n\nExperimental REST Container support\n===================================\n\nThere is some rough support for creating simple CRUD containers like\nso::\n\n import wee\n \n @wee.rest(\"^/candymountain\")\n class UnicornStable(wee.Resource):\n subtype = 'unicorn_id'\n def get(self):\n ... your list of unicorns ...\n\n def post(self):\n name = self.request.POST['unicorn-name']\n ... make a unicorn ...\n \n def getitem(self, unicorn_id):\n ... serve a unicorn ...\n\n def put(self, unicorn_id):\n ... change a unicorn ...\n\n def delete(self, unicorn_id):\n ... kill a unicorn ...\n\n\nThe rest verb generates a series of regexes to dispatch upon for the\nappropriate verbs with a special care to separate 'get' (/) and\n'getitem' (/some_id).\n\n\nOther Differences from itty\n===========================\n\nThe only other main difference is that dispatch is scoped by the\nmodule that defines the handler. This means multiple wee apps can run\nin the same process without clobbering each other. \n\nWe don't give you are run command either, nor any adapters for popular\nframeworks. Maybe later.\n\nCoverage\n========\n\ncoverage.py says 100% currently, but we could have more unittests\nvs. stack tests.\n\n\nWait I'm Confused ...\n=====================\n\n\"When do I use itty and when do I use wee?\"\n\nYou probably shouldn't use either. This is an experiment, so seems to\nbe itty.\n\nIf you are brave though, use `wee` when you want to do some itty or\nsinatra like, but are using Webob. Use `itty` when you want some\ntotally contained in itself w/ no dependencies that requires little\nconfiguration that you want to run as quickly as possible.\n\n\nCredits\n=======\n\n`Daniel Lindsley `_ -- Author of `itty\n`_\n\nMatt George and Whit Morriss -- Ax work on Wee", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "web wsgi", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "wee", "package_url": "https://pypi.org/project/wee/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/wee/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/wee/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "like itty but uses webob request, response and exception objects", "version": "0.1.1", "yanked": false, "yanked_reason": null }, "last_serial": 6013483, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1047413a74e5b4770af4e0ba8150fb41", "sha256": "0d923bab977422934970fbae4bae6e9a9ea5b08de4a8cd44f05d8667a5d78856" }, "downloads": -1, "filename": "wee-0.1.tar.gz", "has_sig": false, "md5_digest": "1047413a74e5b4770af4e0ba8150fb41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6167, "upload_time": "2010-02-25T18:55:24", "upload_time_iso_8601": "2010-02-25T18:55:24.701108Z", "url": "https://files.pythonhosted.org/packages/b3/ab/02b315d39bbab7e6ec9643f6e5620ac29817bcbaf583c0e5378855dad827/wee-0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "db6fd81721f820a5b1ef2309a42997b3", "sha256": "8781ef4b86b759c5f5409263dfba01a4936b73c2a221455a2728168ed4ec7ba8" }, "downloads": -1, "filename": "wee-0.1.1.tar.gz", "has_sig": false, "md5_digest": "db6fd81721f820a5b1ef2309a42997b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6913, "upload_time": "2010-02-26T22:27:24", "upload_time_iso_8601": "2010-02-26T22:27:24.324683Z", "url": "https://files.pythonhosted.org/packages/81/26/6e15cf664e897dec4fc29f437e9828882dc9432f30c8c2f9a58d18b447f3/wee-0.1.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db6fd81721f820a5b1ef2309a42997b3", "sha256": "8781ef4b86b759c5f5409263dfba01a4936b73c2a221455a2728168ed4ec7ba8" }, "downloads": -1, "filename": "wee-0.1.1.tar.gz", "has_sig": false, "md5_digest": "db6fd81721f820a5b1ef2309a42997b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6913, "upload_time": "2010-02-26T22:27:24", "upload_time_iso_8601": "2010-02-26T22:27:24.324683Z", "url": "https://files.pythonhosted.org/packages/81/26/6e15cf664e897dec4fc29f437e9828882dc9432f30c8c2f9a58d18b447f3/wee-0.1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }