METADATA 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. Metadata-Version: 2.3
  2. Name: jsonschema
  3. Version: 4.23.0
  4. Summary: An implementation of JSON Schema validation for Python
  5. Project-URL: Homepage, https://github.com/python-jsonschema/jsonschema
  6. Project-URL: Documentation, https://python-jsonschema.readthedocs.io/
  7. Project-URL: Issues, https://github.com/python-jsonschema/jsonschema/issues/
  8. Project-URL: Funding, https://github.com/sponsors/Julian
  9. Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema&utm_medium=referral&utm_campaign=pypi-link
  10. Project-URL: Changelog, https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst
  11. Project-URL: Source, https://github.com/python-jsonschema/jsonschema
  12. Author-email: Julian Berman <Julian+jsonschema@GrayVines.com>
  13. License: MIT
  14. License-File: COPYING
  15. Keywords: data validation,json,json schema,jsonschema,validation
  16. Classifier: Development Status :: 5 - Production/Stable
  17. Classifier: Intended Audience :: Developers
  18. Classifier: License :: OSI Approved :: MIT License
  19. Classifier: Operating System :: OS Independent
  20. Classifier: Programming Language :: Python
  21. Classifier: Programming Language :: Python :: 3.8
  22. Classifier: Programming Language :: Python :: 3.9
  23. Classifier: Programming Language :: Python :: 3.10
  24. Classifier: Programming Language :: Python :: 3.11
  25. Classifier: Programming Language :: Python :: 3.12
  26. Classifier: Programming Language :: Python :: 3.13
  27. Classifier: Programming Language :: Python :: Implementation :: CPython
  28. Classifier: Programming Language :: Python :: Implementation :: PyPy
  29. Classifier: Topic :: File Formats :: JSON
  30. Classifier: Topic :: File Formats :: JSON :: JSON Schema
  31. Requires-Python: >=3.8
  32. Requires-Dist: attrs>=22.2.0
  33. Requires-Dist: importlib-resources>=1.4.0; python_version < '3.9'
  34. Requires-Dist: jsonschema-specifications>=2023.03.6
  35. Requires-Dist: pkgutil-resolve-name>=1.3.10; python_version < '3.9'
  36. Requires-Dist: referencing>=0.28.4
  37. Requires-Dist: rpds-py>=0.7.1
  38. Provides-Extra: format
  39. Requires-Dist: fqdn; extra == 'format'
  40. Requires-Dist: idna; extra == 'format'
  41. Requires-Dist: isoduration; extra == 'format'
  42. Requires-Dist: jsonpointer>1.13; extra == 'format'
  43. Requires-Dist: rfc3339-validator; extra == 'format'
  44. Requires-Dist: rfc3987; extra == 'format'
  45. Requires-Dist: uri-template; extra == 'format'
  46. Requires-Dist: webcolors>=1.11; extra == 'format'
  47. Provides-Extra: format-nongpl
  48. Requires-Dist: fqdn; extra == 'format-nongpl'
  49. Requires-Dist: idna; extra == 'format-nongpl'
  50. Requires-Dist: isoduration; extra == 'format-nongpl'
  51. Requires-Dist: jsonpointer>1.13; extra == 'format-nongpl'
  52. Requires-Dist: rfc3339-validator; extra == 'format-nongpl'
  53. Requires-Dist: rfc3986-validator>0.1.0; extra == 'format-nongpl'
  54. Requires-Dist: uri-template; extra == 'format-nongpl'
  55. Requires-Dist: webcolors>=24.6.0; extra == 'format-nongpl'
  56. Description-Content-Type: text/x-rst
  57. ==========
  58. jsonschema
  59. ==========
  60. |PyPI| |Pythons| |CI| |ReadTheDocs| |Precommit| |Zenodo|
  61. .. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema.svg
  62. :alt: PyPI version
  63. :target: https://pypi.org/project/jsonschema/
  64. .. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema.svg
  65. :alt: Supported Python versions
  66. :target: https://pypi.org/project/jsonschema/
  67. .. |CI| image:: https://github.com/python-jsonschema/jsonschema/workflows/CI/badge.svg
  68. :alt: Build status
  69. :target: https://github.com/python-jsonschema/jsonschema/actions?query=workflow%3ACI
  70. .. |ReadTheDocs| image:: https://readthedocs.org/projects/python-jsonschema/badge/?version=stable&style=flat
  71. :alt: ReadTheDocs status
  72. :target: https://python-jsonschema.readthedocs.io/en/stable/
  73. .. |Precommit| image:: https://results.pre-commit.ci/badge/github/python-jsonschema/jsonschema/main.svg
  74. :alt: pre-commit.ci status
  75. :target: https://results.pre-commit.ci/latest/github/python-jsonschema/jsonschema/main
  76. .. |Zenodo| image:: https://zenodo.org/badge/3072629.svg
  77. :alt: Zenodo DOI
  78. :target: https://zenodo.org/badge/latestdoi/3072629
  79. ``jsonschema`` is an implementation of the `JSON Schema <https://json-schema.org>`_ specification for Python.
  80. .. code:: python
  81. >>> from jsonschema import validate
  82. >>> # A sample schema, like what we'd get from json.load()
  83. >>> schema = {
  84. ... "type" : "object",
  85. ... "properties" : {
  86. ... "price" : {"type" : "number"},
  87. ... "name" : {"type" : "string"},
  88. ... },
  89. ... }
  90. >>> # If no exception is raised by validate(), the instance is valid.
  91. >>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)
  92. >>> validate(
  93. ... instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema,
  94. ... ) # doctest: +IGNORE_EXCEPTION_DETAIL
  95. Traceback (most recent call last):
  96. ...
  97. ValidationError: 'Invalid' is not of type 'number'
  98. It can also be used from the command line by installing `check-jsonschema <https://github.com/python-jsonschema/check-jsonschema>`_.
  99. Features
  100. --------
  101. * 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>`_
  102. * `Lazy validation <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/protocols/#jsonschema.protocols.Validator.iter_errors>`_ that can iteratively report *all* validation errors.
  103. * `Programmatic querying <https://python-jsonschema.readthedocs.io/en/latest/errors/>`_ of which properties or items failed validation.
  104. Installation
  105. ------------
  106. ``jsonschema`` is available on `PyPI <https://pypi.org/project/jsonschema/>`_. You can install using `pip <https://pip.pypa.io/en/stable/>`_:
  107. .. code:: bash
  108. $ pip install jsonschema
  109. Extras
  110. ======
  111. Two extras are available when installing the package, both currently related to ``format`` validation:
  112. * ``format``
  113. * ``format-nongpl``
  114. They can be used when installing in order to include additional dependencies, e.g.:
  115. .. code:: bash
  116. $ pip install jsonschema'[format]'
  117. 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).
  118. Please read the `format validation documentation <https://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats>`_ for further details.
  119. About
  120. -----
  121. I'm Julian Berman.
  122. ``jsonschema`` is on `GitHub <https://github.com/python-jsonschema/jsonschema>`_.
  123. Get in touch, via GitHub or otherwise, if you've got something to contribute, it'd be most welcome!
  124. You can also generally find me on Libera (nick: ``Julian``) in various channels, including ``#python``.
  125. If you feel overwhelmingly grateful, you can also `sponsor me <https://github.com/sponsors/Julian/>`_.
  126. 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>`_.
  127. Release Information
  128. -------------------
  129. v4.23.0
  130. =======
  131. * Do not reorder dictionaries (schemas, instances) that are printed as part of validation errors.
  132. * Declare support for Py3.13