{ "info": { "author": "Francis Horsman", "author_email": "francis.horsman@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "===========\nCertifiable\n===========\n\nTODO: DISABLE WITH ENVVAR.\n\n\n.. image:: https://img.shields.io/badge/Author:%20francis%20horsman-Available-brightgreen.svg?style=plastic\n :target: https://www.linkedin.com/in/francishorsman\n\n.. image:: https://img.shields.io/pypi/v/certifiable.svg\n :target: https://pypi.python.org/pypi/certifiable\n :alt: PyPi version\n\n.. image:: https://img.shields.io/travis/sys-git/certifiable.svg\n :target: https://travis-ci.org/sys-git/certifiable\n :alt: CI Status\n\n.. image:: https://coveralls.io/repos/github/sys-git/certifiable/badge.svg\n :target: https://coveralls.io/github/sys-git/certifiable\n :alt: Coverage Status\n\n.. image:: https://badge.fury.io/py/certifiable.svg\n :target: https://badge.fury.io/py/certifiable\n\n.. image:: https://img.shields.io/pypi/l/certifiable.svg\n :target: https://img.shields.io/pypi/l/certifiable.svg\n\n.. image:: https://img.shields.io/pypi/wheel/certifiable.svg\n :target: https://img.shields.io/pypi/wheel/certifiable.svg\n\n.. image:: https://img.shields.io/pypi/pyversions/certifiable.svg\n :target: https://img.shields.io/pypi/pyversions/certifiable.svg\n\n.. image:: https://img.shields.io/pypi/status/certifiable.svg\n :target: https://img.shields.io/pypi/status/certifiable.svg\n\n.. image:: https://readthedocs.org/projects/certifiable/badge/?version=latest\n :target: https://certifiable.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/sys-git/certifiable/shield.svg\n :target: https://pyup.io/repos/github/sys-git/certifiable/\n :alt: Updates\n\nCertifiable is a powerful runtime parameter validation library for python.\n\nFeatures\n--------\n--------\n\nExamples of all features can be found here: :ref:`usage`.\n\nCore types\n----------\n\nIt can validate the following *core* types\n\n* Text\n* Unicode\n* String\n* Bytes\n* Bool\n* Int\n* Long\n* Number\n* Decimal\n* Float\n* Enum\n* Enum value\n* Timestamp\n* Date\n* Time\n* Object\n\n\nComplex types\n-------------\n\nThere are more `complex` or compound types into which you can pass `other` certifiers:\n\n* List\n* Tuple\n* Set\n* Iterable\n* Dict\n* Json\n* Html\n* Email\n\n\nOperators\n---------\n\nThere are logical operators to combine certifiers:\n\n\n* ANY (certify_only_one)\n* AND (certify_all)\n* ALL (certify_all)\n* NAND (certify_none)\n* XOR (certify_only_one)\n\nCustom Certifier\n----------------\n\nUse the `make_certifier` decorator and (optionally) bake-in some args and kwargs (any return value\nfrom a certifier is ignored) to create your own certifier (first arg must be the value to certify):\n\n>>> @make_certifier\n... def my_certifier(value, *baked_args, **baked_kwargs):\n... print value\n... print baked_args\n... print baked_kwargs\n... baked_kwargs['data'].append('green')\n... if len(baked_kwargs['data'])==2:\n... raise MyError('damn!')\n\n>>> args_to_bake = ('eggs', 'ham')\n>>> kwargs_to_bake = dict(spam='lots', data=[])\n>>> certifier = my_certifier(*args_to_bake, **kwargs_to_bake)\n\ncertifier can now be used as an argument to other certifiers.\n\n>>> certify_list(\n... [1,'a'],\n... certifier=certifiers,\n... min_len=2,\n... max_len=5,\n... required=True,\n... )\n1\n('eggs', 'ham')\n{'spam': 'lots', data: []}\n'a'\n('eggs', 'ham')\n{'spam': 'lots', data: ['green']}\nTraceback (most recent call last):\n ...\n ...\n ...\nMyError: damn!\n\n\nStatus\n------\n\n* Free software: MIT license\n* Documentation: https://certifiable.readthedocs.io.\n\n\n=======\nHistory\n=======\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sys-git/certifiable", "keywords": "certifiable,validation", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "certifiable", "package_url": "https://pypi.org/project/certifiable/", "platform": "", "project_url": "https://pypi.org/project/certifiable/", "project_urls": { "Homepage": "https://github.com/sys-git/certifiable" }, "release_url": "https://pypi.org/project/certifiable/0.1/", "requires_dist": [ "email-validator (==1.0.3)", "enum34 (==1.1.6)", "lxml (==3.8.0)", "six (==1.11.0)" ], "requires_python": "", "summary": "Certifiers for everyone!", "version": "0.1" }, "last_serial": 3289150, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "423970ef0b4222d92f2e9c3719187572", "sha256": "c2ec9435933c946e89e01d85f26233063fa0db4ee1499d69940b195d053ab52e" }, "downloads": -1, "filename": "certifiable-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "423970ef0b4222d92f2e9c3719187572", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7538, "upload_time": "2017-10-08T17:08:29", "url": "https://files.pythonhosted.org/packages/03/6c/f0332d0a7c90fd490873120c0130d4051b242cf1c2846f47890b8a575cd3/certifiable-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b7ed15f83b24d2e763c962785ad751df", "sha256": "dc08e286a9e3f07710b7fb8180b4e88e6117c3b81718cf19b4dc4c75ab0a636f" }, "downloads": -1, "filename": "certifiable-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b7ed15f83b24d2e763c962785ad751df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 426707, "upload_time": "2017-10-08T17:08:32", "url": "https://files.pythonhosted.org/packages/fd/33/23f2c7bbf63d97804155a6ca5a90ea9c38ff321e869b3732946249648dac/certifiable-0.0.1.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "ca8526616ac903360a062a2e77520597", "sha256": "79dbd69bf0a7c98ace29052f8f86f0fe3feec6d63b2105076bdb37f8b14e2a3d" }, "downloads": -1, "filename": "certifiable-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca8526616ac903360a062a2e77520597", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14764, "upload_time": "2017-10-29T19:21:30", "url": "https://files.pythonhosted.org/packages/3d/c0/75f0162fdd09865d17d8fc51f42585aadd889d62d2ecfd6c3afe5fa0fb69/certifiable-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6209cd891a452b8bf1807594dc22656", "sha256": "733b4bbbfb451696c42a26acbc5f3b3f1751c6d638b924d407e286fb89b191e9" }, "downloads": -1, "filename": "certifiable-0.1.tar.gz", "has_sig": false, "md5_digest": "d6209cd891a452b8bf1807594dc22656", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 236936, "upload_time": "2017-10-29T19:21:33", "url": "https://files.pythonhosted.org/packages/03/d9/62068809e20a5b07a9ee38f06d729128619df72c295d05f3b8f1ce001625/certifiable-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ca8526616ac903360a062a2e77520597", "sha256": "79dbd69bf0a7c98ace29052f8f86f0fe3feec6d63b2105076bdb37f8b14e2a3d" }, "downloads": -1, "filename": "certifiable-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca8526616ac903360a062a2e77520597", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14764, "upload_time": "2017-10-29T19:21:30", "url": "https://files.pythonhosted.org/packages/3d/c0/75f0162fdd09865d17d8fc51f42585aadd889d62d2ecfd6c3afe5fa0fb69/certifiable-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6209cd891a452b8bf1807594dc22656", "sha256": "733b4bbbfb451696c42a26acbc5f3b3f1751c6d638b924d407e286fb89b191e9" }, "downloads": -1, "filename": "certifiable-0.1.tar.gz", "has_sig": false, "md5_digest": "d6209cd891a452b8bf1807594dc22656", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 236936, "upload_time": "2017-10-29T19:21:33", "url": "https://files.pythonhosted.org/packages/03/d9/62068809e20a5b07a9ee38f06d729128619df72c295d05f3b8f1ce001625/certifiable-0.1.tar.gz" } ] }