{ "info": { "author": "Guillaume Bour", "author_email": "guillaume@bour.cc", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "Natural Language :: English", "Natural Language :: French", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: User Interfaces" ], "description": "Mother is a framework written in python and based on twisted. \r\nIt is designed to make developpement of web applications easy and fast. \r\n\r\nIt provides following functionalities among others: \r\n * simple url mapping to code, \r\n * handle multi content-types (html, JSON, ...), \r\n * integration with Tentacles ORM, \r\n * allow use of templating tools (currently, only Mako is supported) \r\n\r\nExample::\r\n\r\n UUID = '7c772000-8f12-4594-9730-9e4de53d55d1'\r\n\r\n from mother import routing\r\n from mother.callable import callback, Callable\r\n from mother.template import Static, Template\r\n\r\n @callback(url=routing.ROOT)\r\n def root(**kwargs):\r\n return \"\"\"\r\n \r\n \r\n Welcome to Mother Sample Application\r\n \r\n \r\n This is the homepage of Mother Sample Application.
\r\n
\r\n You are welcome to watch my source code to see how to build your first\r\n Mother application.\r\n \r\n \r\n \"\"\"\r\n\r\n @callback(url='/foo', content_type='text/plain')\r\n def foo(**kwargs):\r\n return 'foo:: plain text'\r\n\r\n @callback(url='/foo', content_type='application/json')\r\n def foo(**kwargs):\r\n return ['foo', 'json tree']\r\n\r\n @callback(url='/foo', content_type='text/html')\r\n def foo(**kwargs):\r\n return 'foo:: html content'\r\n\r\n @callback\r\n def bar(age, **args):\r\n try:\r\n age = int(age)\r\n except:\r\n return routing.HTTP_404('age MUST be integer')\r\n\r\n return 'the captain is %d years old' % age\r\n\r\n class Captain(Callable):\r\n def __init__(self, **kwargs):\r\n super(Captain, self).__init__(**kwargs)\r\n self._age = 54\r\n\r\n # special methods GET, POST, PUT, DELETE are directly mapped to '/sample/captain' url\r\n def GET(self, **kwargs):\r\n return 'Captain::GET'\r\n\r\n # You can also expose non-special class/instance methods with the callback modified\r\n # Here we learn a new @callback option, named 'method'\r\n #\r\n @callback\r\n def age(self, **kwargs):\r\n return self._age\r\n\r\n # Here we discover a new @callback argument, named 'method'\r\n # taking either a string among 'GET', 'POST','PUT','DELETE' or a list of these\r\n #\r\n # This argument set HTTP method(s) callback is accessible through (default is GET)\r\n @callback(url='/setage', method='POST')\r\n def age_post(self, age, **kwargs):\r\n try:\r\n self._age = int(age)\r\n except:\r\n return routing.HTTP_404('age MUST be integer')\r\n\r\n return routing.HTTP_200('')\r\n\r\n @callback\r\n def hello(**kwargs):\r\n return 'hello'\r\n\r\n URLS = {\r\n # expose function\r\n '/hel-lo' : hello,\r\n # expose static content (directory)\r\n '/static' : Static('static-content/'),\r\n # expose template file\r\n # NOTES\r\n # . template files MUST be stored in a templates/ sub-directory\r\n # . Mako is the only available template engine at present\r\n '/template' : Template('sample.html', title='template sample title',\r\n content=\"\"\"You\\'re viewing a template sample page, rendered with Mako\"\"\")\r\n }", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://devedge.bour.cc/wiki/Mother/", "keywords": "", "license": "GNU Affero General Public License v3", "maintainer": "", "maintainer_email": "", "name": "mother-webapps-framework", "package_url": "https://pypi.org/project/mother-webapps-framework/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mother-webapps-framework/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://devedge.bour.cc/wiki/Mother/" }, "release_url": "https://pypi.org/project/mother-webapps-framework/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Mother - Web Applications Framework", "version": "0.1.0" }, "last_serial": 794987, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ccc6cc256f2baff79a253d71a7fc8d5f", "sha256": "bef5a88e61161a931d7ee2e90a00450b26f3b1a92ce0924754b60ffa584834b6" }, "downloads": -1, "filename": "mother-webapps-framework-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ccc6cc256f2baff79a253d71a7fc8d5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42421, "upload_time": "2011-06-20T22:35:43", "url": "https://files.pythonhosted.org/packages/4a/3c/09875a9549c688d9893725c4e0bc7c08bbe032cb1641a051f158ef486bfa/mother-webapps-framework-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ccc6cc256f2baff79a253d71a7fc8d5f", "sha256": "bef5a88e61161a931d7ee2e90a00450b26f3b1a92ce0924754b60ffa584834b6" }, "downloads": -1, "filename": "mother-webapps-framework-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ccc6cc256f2baff79a253d71a7fc8d5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42421, "upload_time": "2011-06-20T22:35:43", "url": "https://files.pythonhosted.org/packages/4a/3c/09875a9549c688d9893725c4e0bc7c08bbe032cb1641a051f158ef486bfa/mother-webapps-framework-0.1.0.tar.gz" } ] }