jsonschema
Advanced tools
| [console_scripts] | ||
| jsonschema = jsonschema.cli:main |
| Copyright (c) 2013 Julian Berman | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
| Metadata-Version: 2.4 | ||
| Name: jsonschema | ||
| Version: 4.25.0 | ||
| Summary: An implementation of JSON Schema validation for Python | ||
| Project-URL: Homepage, https://github.com/python-jsonschema/jsonschema | ||
| Project-URL: Documentation, https://python-jsonschema.readthedocs.io/ | ||
| Project-URL: Issues, https://github.com/python-jsonschema/jsonschema/issues/ | ||
| Project-URL: Funding, https://github.com/sponsors/Julian | ||
| Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema&utm_medium=referral&utm_campaign=pypi-link | ||
| Project-URL: Changelog, https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst | ||
| Project-URL: Source, https://github.com/python-jsonschema/jsonschema | ||
| Author-email: Julian Berman <Julian+jsonschema@GrayVines.com> | ||
| License-Expression: MIT | ||
| License-File: COPYING | ||
| Keywords: data validation,json,json schema,jsonschema,validation | ||
| Classifier: Development Status :: 5 - Production/Stable | ||
| Classifier: Intended Audience :: Developers | ||
| Classifier: Operating System :: OS Independent | ||
| Classifier: Programming Language :: Python | ||
| Classifier: Programming Language :: Python :: 3.9 | ||
| Classifier: Programming Language :: Python :: 3.10 | ||
| Classifier: Programming Language :: Python :: 3.11 | ||
| Classifier: Programming Language :: Python :: 3.12 | ||
| Classifier: Programming Language :: Python :: 3.13 | ||
| Classifier: Programming Language :: Python :: Implementation :: CPython | ||
| Classifier: Programming Language :: Python :: Implementation :: PyPy | ||
| Classifier: Topic :: File Formats :: JSON | ||
| Classifier: Topic :: File Formats :: JSON :: JSON Schema | ||
| Requires-Python: >=3.9 | ||
| Requires-Dist: attrs>=22.2.0 | ||
| Requires-Dist: jsonschema-specifications>=2023.03.6 | ||
| Requires-Dist: referencing>=0.28.4 | ||
| Requires-Dist: rpds-py>=0.7.1 | ||
| Provides-Extra: format | ||
| Requires-Dist: fqdn; extra == 'format' | ||
| Requires-Dist: idna; extra == 'format' | ||
| Requires-Dist: isoduration; extra == 'format' | ||
| Requires-Dist: jsonpointer>1.13; extra == 'format' | ||
| Requires-Dist: rfc3339-validator; extra == 'format' | ||
| Requires-Dist: rfc3987; extra == 'format' | ||
| Requires-Dist: uri-template; extra == 'format' | ||
| Requires-Dist: webcolors>=1.11; extra == 'format' | ||
| Provides-Extra: format-nongpl | ||
| Requires-Dist: fqdn; extra == 'format-nongpl' | ||
| Requires-Dist: idna; extra == 'format-nongpl' | ||
| Requires-Dist: isoduration; extra == 'format-nongpl' | ||
| Requires-Dist: jsonpointer>1.13; extra == 'format-nongpl' | ||
| Requires-Dist: rfc3339-validator; extra == 'format-nongpl' | ||
| Requires-Dist: rfc3986-validator>0.1.0; extra == 'format-nongpl' | ||
| Requires-Dist: rfc3987-syntax>=1.1.0; extra == 'format-nongpl' | ||
| Requires-Dist: uri-template; extra == 'format-nongpl' | ||
| Requires-Dist: webcolors>=24.6.0; extra == 'format-nongpl' | ||
| Description-Content-Type: text/x-rst | ||
| ========== | ||
| jsonschema | ||
| ========== | ||
| |PyPI| |Pythons| |CI| |ReadTheDocs| |Precommit| |Zenodo| | ||
| .. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema.svg | ||
| :alt: PyPI version | ||
| :target: https://pypi.org/project/jsonschema/ | ||
| .. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema.svg | ||
| :alt: Supported Python versions | ||
| :target: https://pypi.org/project/jsonschema/ | ||
| .. |CI| image:: https://github.com/python-jsonschema/jsonschema/workflows/CI/badge.svg | ||
| :alt: Build status | ||
| :target: https://github.com/python-jsonschema/jsonschema/actions?query=workflow%3ACI | ||
| .. |ReadTheDocs| image:: https://readthedocs.org/projects/python-jsonschema/badge/?version=stable&style=flat | ||
| :alt: ReadTheDocs status | ||
| :target: https://python-jsonschema.readthedocs.io/en/stable/ | ||
| .. |Precommit| image:: https://results.pre-commit.ci/badge/github/python-jsonschema/jsonschema/main.svg | ||
| :alt: pre-commit.ci status | ||
| :target: https://results.pre-commit.ci/latest/github/python-jsonschema/jsonschema/main | ||
| .. |Zenodo| image:: https://zenodo.org/badge/3072629.svg | ||
| :alt: Zenodo DOI | ||
| :target: https://zenodo.org/badge/latestdoi/3072629 | ||
| ``jsonschema`` is an implementation of the `JSON Schema <https://json-schema.org>`_ specification for Python. | ||
| .. code:: python | ||
| >>> from jsonschema import validate | ||
| >>> # A sample schema, like what we'd get from json.load() | ||
| >>> schema = { | ||
| ... "type" : "object", | ||
| ... "properties" : { | ||
| ... "price" : {"type" : "number"}, | ||
| ... "name" : {"type" : "string"}, | ||
| ... }, | ||
| ... } | ||
| >>> # If no exception is raised by validate(), the instance is valid. | ||
| >>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema) | ||
| >>> validate( | ||
| ... instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema, | ||
| ... ) # doctest: +IGNORE_EXCEPTION_DETAIL | ||
| Traceback (most recent call last): | ||
| ... | ||
| ValidationError: 'Invalid' is not of type 'number' | ||
| It can also be used from the command line by installing `check-jsonschema <https://github.com/python-jsonschema/check-jsonschema>`_. | ||
| Features | ||
| -------- | ||
| * Full support for `Draft 2020-12 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft202012Validator>`_, `Draft 2019-09 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft201909Validator>`_, `Draft 7 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft7Validator>`_, `Draft 6 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft6Validator>`_, `Draft 4 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft4Validator>`_ and `Draft 3 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft3Validator>`_ | ||
| * `Lazy validation <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/protocols/#jsonschema.protocols.Validator.iter_errors>`_ that can iteratively report *all* validation errors. | ||
| * `Programmatic querying <https://python-jsonschema.readthedocs.io/en/latest/errors/>`_ of which properties or items failed validation. | ||
| Installation | ||
| ------------ | ||
| ``jsonschema`` is available on `PyPI <https://pypi.org/project/jsonschema/>`_. You can install using `pip <https://pip.pypa.io/en/stable/>`_: | ||
| .. code:: bash | ||
| $ pip install jsonschema | ||
| Extras | ||
| ====== | ||
| Two extras are available when installing the package, both currently related to ``format`` validation: | ||
| * ``format`` | ||
| * ``format-nongpl`` | ||
| They can be used when installing in order to include additional dependencies, e.g.: | ||
| .. code:: bash | ||
| $ pip install jsonschema'[format]' | ||
| Be aware that the mere presence of these dependencies – or even the specification of ``format`` checks in a schema – do *not* activate format checks (as per the specification). | ||
| Please read the `format validation documentation <https://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats>`_ for further details. | ||
| About | ||
| ----- | ||
| I'm Julian Berman. | ||
| ``jsonschema`` is on `GitHub <https://github.com/python-jsonschema/jsonschema>`_. | ||
| Get in touch, via GitHub or otherwise, if you've got something to contribute, it'd be most welcome! | ||
| If you feel overwhelmingly grateful, you can also `sponsor me <https://github.com/sponsors/Julian/>`_. | ||
| And for companies who appreciate ``jsonschema`` and its continued support and growth, ``jsonschema`` is also now supportable via `TideLift <https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema&utm_medium=referral&utm_campaign=readme>`_. | ||
| Release Information | ||
| ------------------- | ||
| v4.25.0 | ||
| ======= | ||
| * Add support for the ``iri`` and ``iri-reference`` formats to the ``format-nongpl`` extra via the MIT-licensed ``rfc3987-syntax``. | ||
| They were alread supported by the ``format`` extra. (#1388). |
| jsonschema/__init__.py,sha256=p-Rw4TS_0OPHZIJyImDWsdWgmd6CPWHMXLq7BuQxTGc,3941 | ||
| jsonschema/__main__.py,sha256=iLsZf2upUB3ilBKTlMnyK-HHt2Cnnfkwwxi_c6gLvSA,115 | ||
| jsonschema/_format.py,sha256=ip1N16CBBOb_8sM_iejyW0U5JY9kXoz3O_AFj1SHFl8,15581 | ||
| jsonschema/_keywords.py,sha256=r8_DrqAfn6QLwQnmXEggveiSU-UaIL2p2nuPINelfFc,14949 | ||
| jsonschema/_legacy_keywords.py,sha256=2tWuwRPWbYS7EAl8wBIC_rabGuv1J4dfYLqNEPpShhA,15191 | ||
| jsonschema/_types.py,sha256=0pYJG61cn_4ZWVnqyD24tax2QBMlnSPy0fcECCpASMk,5456 | ||
| jsonschema/_typing.py,sha256=hFfAEeFJ76LYAl_feuVa0gnHnV9VEq_UhjLJS-7axgY,630 | ||
| jsonschema/_utils.py,sha256=Xv6_wKKslBJlwyj9-j2c8JDFw-4z4aWFnVe2pX8h7U4,10659 | ||
| jsonschema/cli.py,sha256=av90OtpSxuiko3FAyEHtxpI-NSuX3WMtoQpIx09obJY,8445 | ||
| jsonschema/exceptions.py,sha256=b42hUDOfPFcprI4ZlNpjDeLKv8k9vOhgWct2jyDlxzk,15256 | ||
| jsonschema/protocols.py,sha256=Cv3L2xUl1MxQCRMcpNNbBL0nh14ekPYoazNfochqiag,7145 | ||
| jsonschema/validators.py,sha256=8gThVddl0AObBsfChZ2rrzyRUosnFdICxzIL8xrvu84,47098 | ||
| jsonschema/benchmarks/__init__.py,sha256=A0sQrxDBVHSyQ-8ru3L11hMXf3q9gVuB9x_YgHb4R9M,70 | ||
| jsonschema/benchmarks/const_vs_enum.py,sha256=DVFi3WDqBalZFOibnjpX1uTSr3Rxa2cPgFcowd7Ukrs,830 | ||
| jsonschema/benchmarks/contains.py,sha256=gexQoUrCOwECofbt19BeosQZ7WFL6PDdkX49DWwBlOg,786 | ||
| jsonschema/benchmarks/issue232.py,sha256=3LLYLIlBGQnVuyyo2iAv-xky5P6PRFHANx4-zIIQOoE,521 | ||
| jsonschema/benchmarks/json_schema_test_suite.py,sha256=PvfabpUYcF4_7csYDTcTauED8rnFEGYbdY5RqTXD08s,320 | ||
| jsonschema/benchmarks/nested_schemas.py,sha256=mo07dx-CIgmSOI62CNs4g5xu1FzHklLBpkQoDxWYcKs,1892 | ||
| jsonschema/benchmarks/subcomponents.py,sha256=fEyiMzsWeK2pd7DEGCuuY-vzGunwhHczRBWEnBRLKIo,1113 | ||
| jsonschema/benchmarks/unused_registry.py,sha256=hwRwONc9cefPtYzkoX_TYRO3GyUojriv0-YQaK3vnj0,940 | ||
| jsonschema/benchmarks/useless_applicator_schemas.py,sha256=EVm5-EtOEFoLP_Vt2j4SrCwlx05NhPqNuZQ6LIMP1Dc,3342 | ||
| jsonschema/benchmarks/useless_keywords.py,sha256=bj_zKr1oVctFlqyZaObCsYTgFjiiNgPzC0hr1Y868mE,867 | ||
| jsonschema/benchmarks/validator_creation.py,sha256=UkUQlLAnussnr_KdCIdad6xx2pXxQLmYtsXoiirKeWQ,285 | ||
| jsonschema/benchmarks/issue232/issue.json,sha256=eaPOZjMRu5u8RpKrsA9uk7ucPZS5tkKG4D_hkOTQ3Hk,117105 | ||
| jsonschema/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 | ||
| jsonschema/tests/_suite.py,sha256=2k0X91N7dOHhQc5mrYv40OKf1weioj6RMBqWgLT6-PI,8374 | ||
| jsonschema/tests/fuzz_validate.py,sha256=fUA7yTJIihaCwJplkUehZeyB84HcXEcqtY5oPJXIO7I,1114 | ||
| jsonschema/tests/test_cli.py,sha256=A89r5LOHy-peLPZA5YDkOaMTWqzQO_w2Tu8WFz_vphM,28544 | ||
| jsonschema/tests/test_deprecations.py,sha256=yG6mkRJHpTHbWoxpLC5y5H7fk8erGOs8f_9V4tCBEh8,15754 | ||
| jsonschema/tests/test_exceptions.py,sha256=lWTRyeSeOaFd5dnutqy1YG9uocnxeM_0cIEVG6GgGMI,24310 | ||
| jsonschema/tests/test_format.py,sha256=eVm5SMaWF2lOPO28bPAwNvkiQvHCQKy-MnuAgEchfEc,3188 | ||
| jsonschema/tests/test_jsonschema_test_suite.py,sha256=tAfxknM65OR9LyDPHu1pkEaombLgjRLnJ6FPiWPdxjg,8461 | ||
| jsonschema/tests/test_types.py,sha256=cF51KTDmdsx06MrIc4fXKt0X9fIsVgw5uhT8CamVa8U,6977 | ||
| jsonschema/tests/test_utils.py,sha256=sao74o1PyYMxBfqweokQN48CFSS6yhJk5FkCfMJ5PsI,4163 | ||
| jsonschema/tests/test_validators.py,sha256=eiaigsZMzHYYsniQ1UPygaS56a1d-_7-9NC4wVXAhzs,87975 | ||
| jsonschema-4.25.0.dist-info/METADATA,sha256=bQyiuf03Mh6MRgKzs-Ln5Q99hSnEY7KuetcSpLti5sg,7708 | ||
| jsonschema-4.25.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87 | ||
| jsonschema-4.25.0.dist-info/entry_points.txt,sha256=vO7rX4Fs_xIVJy2pnAtKgTSxfpnozAVQ0DjCmpMxnWE,51 | ||
| jsonschema-4.25.0.dist-info/licenses/COPYING,sha256=T5KgFaE8TRoEC-8BiqE0MLTxvHO0Gxa7hGw0Z2bedDk,1057 | ||
| jsonschema-4.25.0.dist-info/RECORD,, |
| Wheel-Version: 1.0 | ||
| Generator: hatchling 1.27.0 | ||
| Root-Is-Purelib: true | ||
| Tag: py3-none-any |
@@ -327,2 +327,27 @@ from __future__ import annotations | ||
| with suppress(ImportError): | ||
| from rfc3987_syntax import is_valid_syntax as _rfc3987_is_valid_syntax | ||
| @_checks_drafts( | ||
| draft7="iri", | ||
| draft201909="iri", | ||
| draft202012="iri", | ||
| raises=ValueError, | ||
| ) | ||
| def is_iri(instance: object) -> bool: | ||
| if not isinstance(instance, str): | ||
| return True | ||
| return _rfc3987_is_valid_syntax("iri", instance) | ||
| @_checks_drafts( | ||
| draft7="iri-reference", | ||
| draft201909="iri-reference", | ||
| draft202012="iri-reference", | ||
| raises=ValueError, | ||
| ) | ||
| def is_iri_reference(instance: object) -> bool: | ||
| if not isinstance(instance, str): | ||
| return True | ||
| return _rfc3987_is_valid_syntax("iri_reference", instance) | ||
| else: | ||
@@ -329,0 +354,0 @@ |
| [console_scripts] | ||
| jsonschema = jsonschema.cli:main |
| Copyright (c) 2013 Julian Berman | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
| Metadata-Version: 2.4 | ||
| Name: jsonschema | ||
| Version: 4.24.1 | ||
| Summary: An implementation of JSON Schema validation for Python | ||
| Project-URL: Homepage, https://github.com/python-jsonschema/jsonschema | ||
| Project-URL: Documentation, https://python-jsonschema.readthedocs.io/ | ||
| Project-URL: Issues, https://github.com/python-jsonschema/jsonschema/issues/ | ||
| Project-URL: Funding, https://github.com/sponsors/Julian | ||
| Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema&utm_medium=referral&utm_campaign=pypi-link | ||
| Project-URL: Changelog, https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst | ||
| Project-URL: Source, https://github.com/python-jsonschema/jsonschema | ||
| Author-email: Julian Berman <Julian+jsonschema@GrayVines.com> | ||
| License-Expression: MIT | ||
| License-File: COPYING | ||
| Keywords: data validation,json,json schema,jsonschema,validation | ||
| Classifier: Development Status :: 5 - Production/Stable | ||
| Classifier: Intended Audience :: Developers | ||
| Classifier: Operating System :: OS Independent | ||
| Classifier: Programming Language :: Python | ||
| Classifier: Programming Language :: Python :: 3.9 | ||
| Classifier: Programming Language :: Python :: 3.10 | ||
| Classifier: Programming Language :: Python :: 3.11 | ||
| Classifier: Programming Language :: Python :: 3.12 | ||
| Classifier: Programming Language :: Python :: 3.13 | ||
| Classifier: Programming Language :: Python :: Implementation :: CPython | ||
| Classifier: Programming Language :: Python :: Implementation :: PyPy | ||
| Classifier: Topic :: File Formats :: JSON | ||
| Classifier: Topic :: File Formats :: JSON :: JSON Schema | ||
| Requires-Python: >=3.9 | ||
| Requires-Dist: attrs>=22.2.0 | ||
| Requires-Dist: jsonschema-specifications>=2023.03.6 | ||
| Requires-Dist: referencing>=0.28.4 | ||
| Requires-Dist: rpds-py>=0.7.1 | ||
| Provides-Extra: format | ||
| Requires-Dist: fqdn; extra == 'format' | ||
| Requires-Dist: idna; extra == 'format' | ||
| Requires-Dist: isoduration; extra == 'format' | ||
| Requires-Dist: jsonpointer>1.13; extra == 'format' | ||
| Requires-Dist: rfc3339-validator; extra == 'format' | ||
| Requires-Dist: rfc3987; extra == 'format' | ||
| Requires-Dist: uri-template; extra == 'format' | ||
| Requires-Dist: webcolors>=1.11; extra == 'format' | ||
| Provides-Extra: format-nongpl | ||
| Requires-Dist: fqdn; extra == 'format-nongpl' | ||
| Requires-Dist: idna; extra == 'format-nongpl' | ||
| Requires-Dist: isoduration; extra == 'format-nongpl' | ||
| Requires-Dist: jsonpointer>1.13; extra == 'format-nongpl' | ||
| Requires-Dist: rfc3339-validator; extra == 'format-nongpl' | ||
| Requires-Dist: rfc3986-validator>0.1.0; extra == 'format-nongpl' | ||
| Requires-Dist: uri-template; extra == 'format-nongpl' | ||
| Requires-Dist: webcolors>=24.6.0; extra == 'format-nongpl' | ||
| Description-Content-Type: text/x-rst | ||
| ========== | ||
| jsonschema | ||
| ========== | ||
| |PyPI| |Pythons| |CI| |ReadTheDocs| |Precommit| |Zenodo| | ||
| .. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema.svg | ||
| :alt: PyPI version | ||
| :target: https://pypi.org/project/jsonschema/ | ||
| .. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema.svg | ||
| :alt: Supported Python versions | ||
| :target: https://pypi.org/project/jsonschema/ | ||
| .. |CI| image:: https://github.com/python-jsonschema/jsonschema/workflows/CI/badge.svg | ||
| :alt: Build status | ||
| :target: https://github.com/python-jsonschema/jsonschema/actions?query=workflow%3ACI | ||
| .. |ReadTheDocs| image:: https://readthedocs.org/projects/python-jsonschema/badge/?version=stable&style=flat | ||
| :alt: ReadTheDocs status | ||
| :target: https://python-jsonschema.readthedocs.io/en/stable/ | ||
| .. |Precommit| image:: https://results.pre-commit.ci/badge/github/python-jsonschema/jsonschema/main.svg | ||
| :alt: pre-commit.ci status | ||
| :target: https://results.pre-commit.ci/latest/github/python-jsonschema/jsonschema/main | ||
| .. |Zenodo| image:: https://zenodo.org/badge/3072629.svg | ||
| :alt: Zenodo DOI | ||
| :target: https://zenodo.org/badge/latestdoi/3072629 | ||
| ``jsonschema`` is an implementation of the `JSON Schema <https://json-schema.org>`_ specification for Python. | ||
| .. code:: python | ||
| >>> from jsonschema import validate | ||
| >>> # A sample schema, like what we'd get from json.load() | ||
| >>> schema = { | ||
| ... "type" : "object", | ||
| ... "properties" : { | ||
| ... "price" : {"type" : "number"}, | ||
| ... "name" : {"type" : "string"}, | ||
| ... }, | ||
| ... } | ||
| >>> # If no exception is raised by validate(), the instance is valid. | ||
| >>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema) | ||
| >>> validate( | ||
| ... instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema, | ||
| ... ) # doctest: +IGNORE_EXCEPTION_DETAIL | ||
| Traceback (most recent call last): | ||
| ... | ||
| ValidationError: 'Invalid' is not of type 'number' | ||
| It can also be used from the command line by installing `check-jsonschema <https://github.com/python-jsonschema/check-jsonschema>`_. | ||
| Features | ||
| -------- | ||
| * Full support for `Draft 2020-12 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft202012Validator>`_, `Draft 2019-09 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft201909Validator>`_, `Draft 7 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft7Validator>`_, `Draft 6 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft6Validator>`_, `Draft 4 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft4Validator>`_ and `Draft 3 <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft3Validator>`_ | ||
| * `Lazy validation <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/protocols/#jsonschema.protocols.Validator.iter_errors>`_ that can iteratively report *all* validation errors. | ||
| * `Programmatic querying <https://python-jsonschema.readthedocs.io/en/latest/errors/>`_ of which properties or items failed validation. | ||
| Installation | ||
| ------------ | ||
| ``jsonschema`` is available on `PyPI <https://pypi.org/project/jsonschema/>`_. You can install using `pip <https://pip.pypa.io/en/stable/>`_: | ||
| .. code:: bash | ||
| $ pip install jsonschema | ||
| Extras | ||
| ====== | ||
| Two extras are available when installing the package, both currently related to ``format`` validation: | ||
| * ``format`` | ||
| * ``format-nongpl`` | ||
| They can be used when installing in order to include additional dependencies, e.g.: | ||
| .. code:: bash | ||
| $ pip install jsonschema'[format]' | ||
| Be aware that the mere presence of these dependencies – or even the specification of ``format`` checks in a schema – do *not* activate format checks (as per the specification). | ||
| Please read the `format validation documentation <https://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats>`_ for further details. | ||
| About | ||
| ----- | ||
| I'm Julian Berman. | ||
| ``jsonschema`` is on `GitHub <https://github.com/python-jsonschema/jsonschema>`_. | ||
| Get in touch, via GitHub or otherwise, if you've got something to contribute, it'd be most welcome! | ||
| If you feel overwhelmingly grateful, you can also `sponsor me <https://github.com/sponsors/Julian/>`_. | ||
| And for companies who appreciate ``jsonschema`` and its continued support and growth, ``jsonschema`` is also now supportable via `TideLift <https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema&utm_medium=referral&utm_campaign=readme>`_. | ||
| Release Information | ||
| ------------------- | ||
| v4.24.1 | ||
| ======= | ||
| * Properly escape segments in ``ValidationError.json_path`` (#139). |
| jsonschema/__init__.py,sha256=p-Rw4TS_0OPHZIJyImDWsdWgmd6CPWHMXLq7BuQxTGc,3941 | ||
| jsonschema/__main__.py,sha256=iLsZf2upUB3ilBKTlMnyK-HHt2Cnnfkwwxi_c6gLvSA,115 | ||
| jsonschema/_format.py,sha256=XMG7Qu44gUEH1H6h-gvU2BKZR0EfzqVfAtjoI9BasbM,14747 | ||
| jsonschema/_keywords.py,sha256=r8_DrqAfn6QLwQnmXEggveiSU-UaIL2p2nuPINelfFc,14949 | ||
| jsonschema/_legacy_keywords.py,sha256=2tWuwRPWbYS7EAl8wBIC_rabGuv1J4dfYLqNEPpShhA,15191 | ||
| jsonschema/_types.py,sha256=0pYJG61cn_4ZWVnqyD24tax2QBMlnSPy0fcECCpASMk,5456 | ||
| jsonschema/_typing.py,sha256=hFfAEeFJ76LYAl_feuVa0gnHnV9VEq_UhjLJS-7axgY,630 | ||
| jsonschema/_utils.py,sha256=Xv6_wKKslBJlwyj9-j2c8JDFw-4z4aWFnVe2pX8h7U4,10659 | ||
| jsonschema/cli.py,sha256=av90OtpSxuiko3FAyEHtxpI-NSuX3WMtoQpIx09obJY,8445 | ||
| jsonschema/exceptions.py,sha256=b42hUDOfPFcprI4ZlNpjDeLKv8k9vOhgWct2jyDlxzk,15256 | ||
| jsonschema/protocols.py,sha256=Cv3L2xUl1MxQCRMcpNNbBL0nh14ekPYoazNfochqiag,7145 | ||
| jsonschema/validators.py,sha256=8gThVddl0AObBsfChZ2rrzyRUosnFdICxzIL8xrvu84,47098 | ||
| jsonschema/benchmarks/__init__.py,sha256=A0sQrxDBVHSyQ-8ru3L11hMXf3q9gVuB9x_YgHb4R9M,70 | ||
| jsonschema/benchmarks/const_vs_enum.py,sha256=DVFi3WDqBalZFOibnjpX1uTSr3Rxa2cPgFcowd7Ukrs,830 | ||
| jsonschema/benchmarks/contains.py,sha256=gexQoUrCOwECofbt19BeosQZ7WFL6PDdkX49DWwBlOg,786 | ||
| jsonschema/benchmarks/issue232.py,sha256=3LLYLIlBGQnVuyyo2iAv-xky5P6PRFHANx4-zIIQOoE,521 | ||
| jsonschema/benchmarks/json_schema_test_suite.py,sha256=PvfabpUYcF4_7csYDTcTauED8rnFEGYbdY5RqTXD08s,320 | ||
| jsonschema/benchmarks/nested_schemas.py,sha256=mo07dx-CIgmSOI62CNs4g5xu1FzHklLBpkQoDxWYcKs,1892 | ||
| jsonschema/benchmarks/subcomponents.py,sha256=fEyiMzsWeK2pd7DEGCuuY-vzGunwhHczRBWEnBRLKIo,1113 | ||
| jsonschema/benchmarks/unused_registry.py,sha256=hwRwONc9cefPtYzkoX_TYRO3GyUojriv0-YQaK3vnj0,940 | ||
| jsonschema/benchmarks/useless_applicator_schemas.py,sha256=EVm5-EtOEFoLP_Vt2j4SrCwlx05NhPqNuZQ6LIMP1Dc,3342 | ||
| jsonschema/benchmarks/useless_keywords.py,sha256=bj_zKr1oVctFlqyZaObCsYTgFjiiNgPzC0hr1Y868mE,867 | ||
| jsonschema/benchmarks/validator_creation.py,sha256=UkUQlLAnussnr_KdCIdad6xx2pXxQLmYtsXoiirKeWQ,285 | ||
| jsonschema/benchmarks/issue232/issue.json,sha256=eaPOZjMRu5u8RpKrsA9uk7ucPZS5tkKG4D_hkOTQ3Hk,117105 | ||
| jsonschema/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 | ||
| jsonschema/tests/_suite.py,sha256=2k0X91N7dOHhQc5mrYv40OKf1weioj6RMBqWgLT6-PI,8374 | ||
| jsonschema/tests/fuzz_validate.py,sha256=fUA7yTJIihaCwJplkUehZeyB84HcXEcqtY5oPJXIO7I,1114 | ||
| jsonschema/tests/test_cli.py,sha256=A89r5LOHy-peLPZA5YDkOaMTWqzQO_w2Tu8WFz_vphM,28544 | ||
| jsonschema/tests/test_deprecations.py,sha256=yG6mkRJHpTHbWoxpLC5y5H7fk8erGOs8f_9V4tCBEh8,15754 | ||
| jsonschema/tests/test_exceptions.py,sha256=lWTRyeSeOaFd5dnutqy1YG9uocnxeM_0cIEVG6GgGMI,24310 | ||
| jsonschema/tests/test_format.py,sha256=eVm5SMaWF2lOPO28bPAwNvkiQvHCQKy-MnuAgEchfEc,3188 | ||
| jsonschema/tests/test_jsonschema_test_suite.py,sha256=tAfxknM65OR9LyDPHu1pkEaombLgjRLnJ6FPiWPdxjg,8461 | ||
| jsonschema/tests/test_types.py,sha256=cF51KTDmdsx06MrIc4fXKt0X9fIsVgw5uhT8CamVa8U,6977 | ||
| jsonschema/tests/test_utils.py,sha256=sao74o1PyYMxBfqweokQN48CFSS6yhJk5FkCfMJ5PsI,4163 | ||
| jsonschema/tests/test_validators.py,sha256=eiaigsZMzHYYsniQ1UPygaS56a1d-_7-9NC4wVXAhzs,87975 | ||
| jsonschema-4.24.1.dist-info/METADATA,sha256=Qtv6OTIXIzJTGFgo-sl97IejZrw84DROnb5-VrO9EDI,7518 | ||
| jsonschema-4.24.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87 | ||
| jsonschema-4.24.1.dist-info/entry_points.txt,sha256=vO7rX4Fs_xIVJy2pnAtKgTSxfpnozAVQ0DjCmpMxnWE,51 | ||
| jsonschema-4.24.1.dist-info/licenses/COPYING,sha256=T5KgFaE8TRoEC-8BiqE0MLTxvHO0Gxa7hGw0Z2bedDk,1057 | ||
| jsonschema-4.24.1.dist-info/RECORD,, |
| Wheel-Version: 1.0 | ||
| Generator: hatchling 1.27.0 | ||
| Root-Is-Purelib: true | ||
| Tag: py3-none-any |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
473814
0.22%11389
0.19%