{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# perfect-jsonschema\n[![Build Status](https://travis-ci.org/manycoding/perfect-jsonschema.svg?branch=master)](https://travis-ci.org/manycoding/perfect-jsonschema)\n[![codecov](https://codecov.io/gh/manycoding/perfect-jsonschema/branch/master/graph/badge.svg)](https://codecov.io/gh/manycoding/perfect-jsonschema)\n---\n_Because soft validation is not enough_\n\n# Why\n[JSON schema standard](https://json-schema.org/) and its implementations stand that if you have something unfamiliar in your schema, it's not an error. In particular, you won't get an error if you made a typo or used something you thought as working. For example, this one is perfectly fine and valid:\n\n {\n \"required\": [\"company\"],\n \"type\": \"object\",\n \"propertie\": {\"company\": {\"pattern\": \"^(Apple)$\"}, \"format\": \"url\"},\n }\n\nBut we want to catch those `propertie` typos and invalid `url` [formats](https://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats).\n\nThe library rely on [jsonschema](https://github.com/Julian/jsonschema) and supports additional keywords to ignore.\n\n# Features\n\nDerives the draft from the schema and yields a `jsonschema.SchemaError` if:\n* A schema is empty\n* A schema contains a keyword which is not a part of a jsonschema implementation or `extended_keywords` set\n* A schema contains an invalid format value\n* A schema fails with `jsonschema.check_schema()`\n\n# Usage\n\n from perfect-jsonschema import check\n\n try:\n check(schema, extended_keywords={\"tag\"})\n except Exception as e:\n do_something()\n\nAn exception example:\n\n Traceback (most recent call last):\n f\"Schema contains invalid keywords for \"\n jsonschema.exceptions.SchemaError: Schema contains invalid keywords for http://json-schema.org/draft-07/schema#:\n {'propertie', 'company'}\n\n# Local development\n\n pipenv install --dev\n pipenv shell\n tox\n\n# Contribution\n\n Any contribution is welcome\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/manycoding/perfect-jsonschema", "keywords": "", "license": "MIT", "maintainer": "manycoding", "maintainer_email": "manycoding@users.noreply.github.com", "name": "perfect-jsonschema", "package_url": "https://pypi.org/project/perfect-jsonschema/", "platform": "", "project_url": "https://pypi.org/project/perfect-jsonschema/", "project_urls": { "Homepage": "https://github.com/manycoding/perfect-jsonschema" }, "release_url": "https://pypi.org/project/perfect-jsonschema/2019.2.6/", "requires_dist": [ "jsonschema[format] (>=3.0.0b3)" ], "requires_python": "", "summary": "Strictly checks that a json schema is valid", "version": "2019.2.6" }, "last_serial": 4783719, "releases": { "2019.2.5": [ { "comment_text": "", "digests": { "md5": "29366ad2cb433304fa88d72168fb656c", "sha256": "94b131c06ca3a6b906c591929ec4ad58470dd91fed0a7205674a2eb9c592dedc" }, "downloads": -1, "filename": "perfect_jsonschema-2019.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "29366ad2cb433304fa88d72168fb656c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4519, "upload_time": "2019-02-05T20:00:35", "url": "https://files.pythonhosted.org/packages/22/ac/d9a8f5aa92ed6a4a6464e649e6a0f91c8bcceca1bd274df6d3dffa42a603/perfect_jsonschema-2019.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "396c74fb1e6cbf527af539cfe2632050", "sha256": "b6fc3458644fcc1c634cc2361c1d0cfa031b7b785c71a7620b1e86bd836dc455" }, "downloads": -1, "filename": "perfect-jsonschema-2019.2.5.tar.gz", "has_sig": false, "md5_digest": "396c74fb1e6cbf527af539cfe2632050", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11628, "upload_time": "2019-02-05T20:00:37", "url": "https://files.pythonhosted.org/packages/58/46/87376dc28f326644ac0434938d4d76bfc1fac1915fdedcb2e9dcf7d534d3/perfect-jsonschema-2019.2.5.tar.gz" } ], "2019.2.6": [ { "comment_text": "", "digests": { "md5": "c74163ab375872de781ca148ab657c84", "sha256": "0dbb049a48eaa1636cacdd6119fd8e6425561fa7f9b028e926774b26517d7aa4" }, "downloads": -1, "filename": "perfect_jsonschema-2019.2.6-py3-none-any.whl", "has_sig": false, "md5_digest": "c74163ab375872de781ca148ab657c84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4546, "upload_time": "2019-02-05T20:29:07", "url": "https://files.pythonhosted.org/packages/ea/c1/de9bb485f2d7cf7e11ef27a291a80cf31fcc76db59e864d89f21333f656e/perfect_jsonschema-2019.2.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2ce0966b1e0fb2f0543e4e551628997", "sha256": "441877f9a9ec32716715acc13b5c28f79a34f98f0823178b2d992fa95526bc00" }, "downloads": -1, "filename": "perfect-jsonschema-2019.2.6.tar.gz", "has_sig": false, "md5_digest": "b2ce0966b1e0fb2f0543e4e551628997", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11659, "upload_time": "2019-02-05T20:29:09", "url": "https://files.pythonhosted.org/packages/98/7e/1c6c39297d09363e88d53e9d805f0cf1bb39dde67a69801d162529b28207/perfect-jsonschema-2019.2.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c74163ab375872de781ca148ab657c84", "sha256": "0dbb049a48eaa1636cacdd6119fd8e6425561fa7f9b028e926774b26517d7aa4" }, "downloads": -1, "filename": "perfect_jsonschema-2019.2.6-py3-none-any.whl", "has_sig": false, "md5_digest": "c74163ab375872de781ca148ab657c84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4546, "upload_time": "2019-02-05T20:29:07", "url": "https://files.pythonhosted.org/packages/ea/c1/de9bb485f2d7cf7e11ef27a291a80cf31fcc76db59e864d89f21333f656e/perfect_jsonschema-2019.2.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2ce0966b1e0fb2f0543e4e551628997", "sha256": "441877f9a9ec32716715acc13b5c28f79a34f98f0823178b2d992fa95526bc00" }, "downloads": -1, "filename": "perfect-jsonschema-2019.2.6.tar.gz", "has_sig": false, "md5_digest": "b2ce0966b1e0fb2f0543e4e551628997", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11659, "upload_time": "2019-02-05T20:29:09", "url": "https://files.pythonhosted.org/packages/98/7e/1c6c39297d09363e88d53e9d805f0cf1bb39dde67a69801d162529b28207/perfect-jsonschema-2019.2.6.tar.gz" } ] }