{ "info": { "author": "Tom Primozic", "author_email": "tom.primozic@zemanta.com", "bugtrack_url": null, "classifiers": [], "description": "Typed - a Python data validation library\n========================================\n\nThis library allows type tests and transformation and can be used for data loading, storing and validation.\n\n\nUsage\n-----\n\nSimple type-checking::\n\n import typed\n\n\t\tt1 = typed.int | typed.string\n\n\t\tassert t1.test('abc')\n\t\tassert t1.test(u'xyz')\n\t\tassert t1.test(30)\n\t\tassert not t1.test(1.2)\n\t\tassert not t1.test(True)\n\t\tassert not t1.test(None)\n\n\t\tt2 = typed.list(typed.int)\n\n\t\tassert t1.test([1, 2, 3])\n\t\tassert t1.test([])\n\t\tassert not t1.test(['a', 'b', 'c'])\n\n\t\tt3 = typed.list(typed.int | typed.string)\n\n\t\tassert t3.test([1, 'a', 2, 'b'])\n\n\t\tt4 = typed.list(typed.int) | typed.list(typed.string)\n\n\t\tassert t4.test([1, 2, 3])\n\t\tassert t4.test(['a', 'b', 'c'])\n\t\tassert not t4.test([1, 'a', 2, 'b'])\n\n\t\tt5 = typed.set(1, 2, 3)\n\n\t\tassert t5.test(2)\n\t\tassert not t5.test(4)\n\n\t\tt6 = typed.dict({\n\t\t\t\t'a': typed.int,\n\t\t\t\t'b': typed.bool.optional,\n\t\t\t\t'c': (typed.int | typed.none).optional,\n\t\t\t})", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/zemanta/typed/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "typed", "package_url": "https://pypi.org/project/typed/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/typed/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/zemanta/typed/" }, "release_url": "https://pypi.org/project/typed/0.6/", "requires_dist": null, "requires_python": null, "summary": "A Python typing library for data validation.", "version": "0.6" }, "last_serial": 823054, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c836a67ab58aa60a4e4329e8a40a6394", "sha256": "6c6ffe3bcf0add1387b594442ad6339983afdd449517dc1b28c9b0184b432d93" }, "downloads": -1, "filename": "typed-0.1.tar.gz", "has_sig": false, "md5_digest": "c836a67ab58aa60a4e4329e8a40a6394", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6997, "upload_time": "2013-07-23T13:45:10", "url": "https://files.pythonhosted.org/packages/69/4c/10e3cebb040a51b0a2d32e809f78b06d40c075ca3dd22780c0817808e1b8/typed-0.1.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "9fcba9bca02445c2c4800ec58955b985", "sha256": "97bb17f283001e6bc893474db4ce0c9712642656c8ecbbca0a1d7f42aeae0b22" }, "downloads": -1, "filename": "typed-0.6.tar.gz", "has_sig": false, "md5_digest": "9fcba9bca02445c2c4800ec58955b985", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6990, "upload_time": "2013-07-23T13:58:38", "url": "https://files.pythonhosted.org/packages/41/d2/6ee091aae2973bd29909089fd119de5221385354b7e35b3a2541bab3d874/typed-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9fcba9bca02445c2c4800ec58955b985", "sha256": "97bb17f283001e6bc893474db4ce0c9712642656c8ecbbca0a1d7f42aeae0b22" }, "downloads": -1, "filename": "typed-0.6.tar.gz", "has_sig": false, "md5_digest": "9fcba9bca02445c2c4800ec58955b985", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6990, "upload_time": "2013-07-23T13:58:38", "url": "https://files.pythonhosted.org/packages/41/d2/6ee091aae2973bd29909089fd119de5221385354b7e35b3a2541bab3d874/typed-0.6.tar.gz" } ] }