METADATA 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. Metadata-Version: 2.4
  2. Name: jsonschema
  3. Version: 4.26.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-Expression: 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: Operating System :: OS Independent
  19. Classifier: Programming Language :: Python
  20. Classifier: Programming Language :: Python :: 3.10
  21. Classifier: Programming Language :: Python :: 3.11
  22. Classifier: Programming Language :: Python :: 3.12
  23. Classifier: Programming Language :: Python :: 3.13
  24. Classifier: Programming Language :: Python :: 3.14
  25. Classifier: Programming Language :: Python :: Implementation :: CPython
  26. Classifier: Programming Language :: Python :: Implementation :: PyPy
  27. Classifier: Topic :: File Formats :: JSON
  28. Classifier: Topic :: File Formats :: JSON :: JSON Schema
  29. Requires-Python: >=3.10
  30. Requires-Dist: attrs>=22.2.0
  31. Requires-Dist: jsonschema-specifications>=2023.03.6
  32. Requires-Dist: referencing>=0.28.4
  33. Requires-Dist: rpds-py>=0.25.0
  34. Provides-Extra: format
  35. Requires-Dist: fqdn; extra == 'format'
  36. Requires-Dist: idna; extra == 'format'
  37. Requires-Dist: isoduration; extra == 'format'
  38. Requires-Dist: jsonpointer>1.13; extra == 'format'
  39. Requires-Dist: rfc3339-validator; extra == 'format'
  40. Requires-Dist: rfc3987; extra == 'format'
  41. Requires-Dist: uri-template; extra == 'format'
  42. Requires-Dist: webcolors>=1.11; extra == 'format'
  43. Provides-Extra: format-nongpl
  44. Requires-Dist: fqdn; extra == 'format-nongpl'
  45. Requires-Dist: idna; extra == 'format-nongpl'
  46. Requires-Dist: isoduration; extra == 'format-nongpl'
  47. Requires-Dist: jsonpointer>1.13; extra == 'format-nongpl'
  48. Requires-Dist: rfc3339-validator; extra == 'format-nongpl'
  49. Requires-Dist: rfc3986-validator>0.1.0; extra == 'format-nongpl'
  50. Requires-Dist: rfc3987-syntax>=1.1.0; extra == 'format-nongpl'
  51. Requires-Dist: uri-template; extra == 'format-nongpl'
  52. Requires-Dist: webcolors>=24.6.0; extra == 'format-nongpl'
  53. Description-Content-Type: text/x-rst
  54. ==========
  55. jsonschema
  56. ==========
  57. |PyPI| |Pythons| |CI| |ReadTheDocs| |Precommit| |Zenodo|
  58. .. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema.svg
  59. :alt: PyPI version
  60. :target: https://pypi.org/project/jsonschema/
  61. .. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema.svg
  62. :alt: Supported Python versions
  63. :target: https://pypi.org/project/jsonschema/
  64. .. |CI| image:: https://github.com/python-jsonschema/jsonschema/workflows/CI/badge.svg
  65. :alt: Build status
  66. :target: https://github.com/python-jsonschema/jsonschema/actions?query=workflow%3ACI
  67. .. |ReadTheDocs| image:: https://readthedocs.org/projects/python-jsonschema/badge/?version=stable&style=flat
  68. :alt: ReadTheDocs status
  69. :target: https://python-jsonschema.readthedocs.io/en/stable/
  70. .. |Precommit| image:: https://results.pre-commit.ci/badge/github/python-jsonschema/jsonschema/main.svg
  71. :alt: pre-commit.ci status
  72. :target: https://results.pre-commit.ci/latest/github/python-jsonschema/jsonschema/main
  73. .. |Zenodo| image:: https://zenodo.org/badge/3072629.svg
  74. :alt: Zenodo DOI
  75. :target: https://zenodo.org/badge/latestdoi/3072629
  76. ``jsonschema`` is an implementation of the `JSON Schema <https://json-schema.org>`_ specification for Python.
  77. .. code:: python
  78. >>> from jsonschema import validate
  79. >>> # A sample schema, like what we'd get from json.load()
  80. >>> schema = {
  81. ... "type" : "object",
  82. ... "properties" : {
  83. ... "price" : {"type" : "number"},
  84. ... "name" : {"type" : "string"},
  85. ... },
  86. ... }
  87. >>> # If no exception is raised by validate(), the instance is valid.
  88. >>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)
  89. >>> validate(
  90. ... instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema,
  91. ... ) # doctest: +IGNORE_EXCEPTION_DETAIL
  92. Traceback (most recent call last):
  93. ...
  94. ValidationError: 'Invalid' is not of type 'number'
  95. It can also be used from the command line by installing `check-jsonschema <https://github.com/python-jsonschema/check-jsonschema>`_.
  96. Features
  97. --------
  98. * 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>`_
  99. * `Lazy validation <https://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/protocols/#jsonschema.protocols.Validator.iter_errors>`_ that can iteratively report *all* validation errors.
  100. * `Programmatic querying <https://python-jsonschema.readthedocs.io/en/latest/errors/>`_ of which properties or items failed validation.
  101. Installation
  102. ------------
  103. ``jsonschema`` is available on `PyPI <https://pypi.org/project/jsonschema/>`_. You can install using `pip <https://pip.pypa.io/en/stable/>`_:
  104. .. code:: bash
  105. $ pip install jsonschema
  106. Extras
  107. ======
  108. Two extras are available when installing the package, both currently related to ``format`` validation:
  109. * ``format``
  110. * ``format-nongpl``
  111. They can be used when installing in order to include additional dependencies, e.g.:
  112. .. code:: bash
  113. $ pip install jsonschema'[format]'
  114. 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).
  115. Please read the `format validation documentation <https://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats>`_ for further details.
  116. About
  117. -----
  118. I'm Julian Berman.
  119. ``jsonschema`` is on `GitHub <https://github.com/python-jsonschema/jsonschema>`_.
  120. Get in touch, via GitHub or otherwise, if you've got something to contribute, it'd be most welcome!
  121. If you feel overwhelmingly grateful, you can also `sponsor me <https://github.com/sponsors/Julian/>`_.
  122. 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>`_.
  123. Release Information
  124. -------------------
  125. v4.26.0
  126. =======
  127. * Decrease import time by delaying importing of ``urllib.request`` (#1416).