{ "info": { "author": "Akira Kito", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "fivalid\n=======\n\nfivalid is lightweight field data validator.\n\nFeatures\n--------\ndata validation::\n \n >>> from fivalid import validators\n >>> num = validators.Number(max=20)\n >>> num(10)\n >>> num(21)\n fivalid.validators.InvalidValueError: over max\n\ndata validation and conversion::\n \n >>> from fivalid import BaseField, validators, converters\n >>> class PercentageField(BaseField):\n ... validator = validators.All(\n ... validators.Number(min=0, max=100),\n ... validators.String())\n ... converter = converters.int_converter\n >>> field = PercentageField()\n >>> field('99')\n 99\n >>> field('200')\n fivalid.validators.InvalidValueError: over max\n\nstructured data (e.g. nested dict, nested list) validation and conversion::\n \n >>> from fivalid import StructuredFields, Dict, BaseField\n >>> from fivalid.validators import String, Length, All, Flag\n >>> from fivalid.converters import truthvalue_converter\n >>> class CommentField(BaseField):\n ... validator = All(String(), Length(max=500))\n >>> class NicknameField(BaseField):\n ... validator = All(String(), Length(max=20))\n >>> class RememberMeField(BaseField):\n ... validator = Flag()\n ... converter = truthvalue_converter\n >>> rule = Dict(\n ... {'comment': CommentField(required=True),\n ... 'nickname': NicknameField(),\n ... 'remember me': RememberMeField()}\n ... )\n >>> stfields = StructuredFields(rule)\n >>> stfields({'comment': 'Hello, fivalid.',\n ... 'nickname': 'John Doe',\n ... 'remember me': '1'}\n ... )\n {'comment': u'Hello, fivalid.', 'nickname': u'John Doe', 'remember me': True}", "description_content_type": null, "docs_url": "https://pythonhosted.org/fivalid/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AkiraKito/fivalid", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "fivalid", "package_url": "https://pypi.org/project/fivalid/", "platform": "any", "project_url": "https://pypi.org/project/fivalid/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/AkiraKito/fivalid" }, "release_url": "https://pypi.org/project/fivalid/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Lightweight field data validator.", "version": "0.3.0" }, "last_serial": 792003, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "4896cae2e413117273507c6e9f805999", "sha256": "b9e059fe4b40633d83f9e253459f5528771e2972d3d4b1d9d92e8a911e6f6bd1" }, "downloads": -1, "filename": "fivalid-0.2.0.zip", "has_sig": false, "md5_digest": "4896cae2e413117273507c6e9f805999", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14365, "upload_time": "2012-04-03T01:38:37", "url": "https://files.pythonhosted.org/packages/5d/31/137071897b22fcc80ad07bd4ea305780870d18e30e7e356c41b5002cc855/fivalid-0.2.0.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "49b9bc6c50077d566ab1a645f3f83a1a", "sha256": "9e4b26cbb22b40861ee6fb595319eaffc1f9429173697654d0e6e408dabee598" }, "downloads": -1, "filename": "fivalid-0.2.1.zip", "has_sig": false, "md5_digest": "49b9bc6c50077d566ab1a645f3f83a1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15998, "upload_time": "2012-04-04T10:42:29", "url": "https://files.pythonhosted.org/packages/e8/c9/d5223018a1bb449fecb44431cdbd380d4069093c710acd73ccc9da205634/fivalid-0.2.1.zip" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "d2637a219498253375d52af6f0a8025b", "sha256": "9954a85c2652ab243735f99489e81ad9b3db950e3dc0c22c6694ba27a5ebeab5" }, "downloads": -1, "filename": "fivalid-0.2.2.zip", "has_sig": false, "md5_digest": "d2637a219498253375d52af6f0a8025b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16198, "upload_time": "2012-04-23T11:28:50", "url": "https://files.pythonhosted.org/packages/a8/51/e3f350838eb55d9fe9611088329ccea0562e447fea3c4d18769b3fe5e7c2/fivalid-0.2.2.zip" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "55ca4b1b643aa0cfc658b523447f4f4e", "sha256": "b0b2f08c8f3666db54f1fb0042a3b499696156262fa1f202d7416dc601c866bf" }, "downloads": -1, "filename": "fivalid-0.2.3.zip", "has_sig": false, "md5_digest": "55ca4b1b643aa0cfc658b523447f4f4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16277, "upload_time": "2012-04-30T05:31:25", "url": "https://files.pythonhosted.org/packages/53/38/3871ef25ff0f9e89a56326fe82570bcfbd49db4f4c93c6e9e18963d664f7/fivalid-0.2.3.zip" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "4cda99ffdd4bce86b4abaadad6e16527", "sha256": "0a328217fbac48fe95795e11905976747f90454adfa45280c5e76c1f3bc61859" }, "downloads": -1, "filename": "fivalid-0.2.4.zip", "has_sig": false, "md5_digest": "4cda99ffdd4bce86b4abaadad6e16527", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16755, "upload_time": "2012-05-27T16:51:43", "url": "https://files.pythonhosted.org/packages/b7/1e/acb57bec57c79abedb50c991ec986922e7a2269add179aa922c7c289eb15/fivalid-0.2.4.zip" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "9d43f35e0836d08c62b62273dc2efc7a", "sha256": "a59dd29382de404313ed3b4ae90f7e1e99c8fef0fd1156bc74296cfaebb56161" }, "downloads": -1, "filename": "fivalid-0.2.5.zip", "has_sig": false, "md5_digest": "9d43f35e0836d08c62b62273dc2efc7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16786, "upload_time": "2012-06-07T04:41:09", "url": "https://files.pythonhosted.org/packages/ee/9f/9c14e2471ec390ef4df601760802233f84c167325e021ea27b0dd752b143/fivalid-0.2.5.zip" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "926af5d9271b68fced45b9e7a082a9d8", "sha256": "f197ec472df10dc10210fabad1863dc9f3ee7b68940cc3c04ea1b6ee353d228f" }, "downloads": -1, "filename": "fivalid-0.3.0.zip", "has_sig": false, "md5_digest": "926af5d9271b68fced45b9e7a082a9d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17194, "upload_time": "2012-11-11T11:39:32", "url": "https://files.pythonhosted.org/packages/27/c0/6a8c124c5c2be145ae5af8d0eda98762d356c9054f456ed750b3f947d62c/fivalid-0.3.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "926af5d9271b68fced45b9e7a082a9d8", "sha256": "f197ec472df10dc10210fabad1863dc9f3ee7b68940cc3c04ea1b6ee353d228f" }, "downloads": -1, "filename": "fivalid-0.3.0.zip", "has_sig": false, "md5_digest": "926af5d9271b68fced45b9e7a082a9d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17194, "upload_time": "2012-11-11T11:39:32", "url": "https://files.pythonhosted.org/packages/27/c0/6a8c124c5c2be145ae5af8d0eda98762d356c9054f456ed750b3f947d62c/fivalid-0.3.0.zip" } ] }