{ "info": { "author": "Alfredo Deza", "author_email": "contact at deza.pe", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "pecan-notario\n-------------\nJSON validation for Pecan with Notario (http://notario.cafepais.com).\n\nIn its simplest form, you need to define a schema and decorate the\ncontroller method, like::\n\n schema = ('foo', True)\n\n @expose()\n @validate(schema)\n def some_controller(self, **kw):\n return dict()\n\n\nThe above controller method, using a Notario schema, will require a ``foo``\nkey and a ``True`` value otherwise it will (by default) set the HTTP response\nto a ``400`` (invalid request) and add the validation error to ``request.pecan['schema'].errors``.\n\n\nUsing a handler\n---------------\nIf more granular control is needed when dealing with an error condition,\na handler can be passed in to the decorator to deal with errors explicitly.\n\n::\n\n @expose()\n @validate(some_schema, '/some/handler')\n def some_controller(self, **kw):\n return dict()\n\n\nIn this situation '/some/handler' would be a controller method that can deal\ndirectly with the error that was slapped onto the request object (on\n``request.validation_error``).\n\nNotario exceptions will include a ``reason`` attribute that will contain the\nspecific error message that was raised if a custom validator failed with an\nerror message. In this case, a handler would access this Notario exception\nattribute like::\n\n request.validation_error.reason\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alfredodeza/pecan-notario", "keywords": "pecan validation decorator", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pecan-notario", "package_url": "https://pypi.org/project/pecan-notario/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pecan-notario/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/alfredodeza/pecan-notario" }, "release_url": "https://pypi.org/project/pecan-notario/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "", "version": "0.0.3" }, "last_serial": 1974484, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ef364bd76b9199cea39b656c5c0d1501", "sha256": "4c9d62cd0dd6f9c60d653f85a95c91dd700e9e8f95b33c4d6abb0904a3ba02a4" }, "downloads": -1, "filename": "pecan-notario-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ef364bd76b9199cea39b656c5c0d1501", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2983, "upload_time": "2014-06-17T21:58:18", "url": "https://files.pythonhosted.org/packages/d3/2f/212846499ea94da7ba0161047dd342f703a564260437eb7f3a864c7fc98e/pecan-notario-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "255cea9671bf610e265ea2912bb88155", "sha256": "2b1aaba98707b5fbf89d46ec110f2e2175a7f627771695dd9cf0edd9e6fa0de6" }, "downloads": -1, "filename": "pecan-notario-0.0.2.tar.gz", "has_sig": false, "md5_digest": "255cea9671bf610e265ea2912bb88155", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3604, "upload_time": "2016-02-04T21:11:51", "url": "https://files.pythonhosted.org/packages/e5/71/d81785cab34adbe5ff6e7780c552ae09f21d34d950e34b60ba6c21c4140b/pecan-notario-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "72664d105f71bfbe69d908ec77506366", "sha256": "92114160ee39832d9dd523f1859ea9ba7d8260a0972eb5140fda9cfc39fd8536" }, "downloads": -1, "filename": "pecan-notario-0.0.3.tar.gz", "has_sig": false, "md5_digest": "72664d105f71bfbe69d908ec77506366", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5348, "upload_time": "2016-02-24T15:53:18", "url": "https://files.pythonhosted.org/packages/27/95/acc1c292afd73065d9433092247ec3a9edeccd3df4069236ba11f51ccea1/pecan-notario-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "72664d105f71bfbe69d908ec77506366", "sha256": "92114160ee39832d9dd523f1859ea9ba7d8260a0972eb5140fda9cfc39fd8536" }, "downloads": -1, "filename": "pecan-notario-0.0.3.tar.gz", "has_sig": false, "md5_digest": "72664d105f71bfbe69d908ec77506366", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5348, "upload_time": "2016-02-24T15:53:18", "url": "https://files.pythonhosted.org/packages/27/95/acc1c292afd73065d9433092247ec3a9edeccd3df4069236ba11f51ccea1/pecan-notario-0.0.3.tar.gz" } ] }