first commit

This commit is contained in:
Ayxan
2022-05-23 00:16:32 +04:00
commit d660f2a4ca
24786 changed files with 4428337 additions and 0 deletions

View File

@ -0,0 +1,19 @@
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.

View File

@ -0,0 +1 @@
pip

View File

@ -0,0 +1,202 @@
Metadata-Version: 2.1
Name: jsonschema
Version: 4.5.1
Summary: An implementation of JSON Schema validation for Python
Home-page: https://github.com/python-jsonschema/jsonschema
Author: Julian Berman
Author-email: Julian@GrayVines.com
License: MIT
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: Documentation, https://python-jsonschema.readthedocs.io/en/latest/
Project-URL: Source, https://github.com/python-jsonschema/jsonschema
Project-URL: Issues, https://github.com/python-jsonschema/jsonschema/issues/
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: COPYING
Requires-Dist: attrs (>=17.4.0)
Requires-Dist: pyrsistent (!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0)
Requires-Dist: importlib-metadata ; python_version < "3.8"
Requires-Dist: typing-extensions ; python_version < "3.8"
Requires-Dist: importlib-resources (>=1.4.0) ; python_version < "3.9"
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 (>=1.11) ; extra == 'format_nongpl'
==========
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
:target: https://zenodo.org/badge/latestdoi/3072629
``jsonschema`` is an implementation of the `JSON Schema
<https://json-schema.org>`_ specification for Python.
.. code-block:: 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 console:
.. code-block:: bash
$ jsonschema --instance sample.json sample.schema
Features
--------
* Partial support for
`Draft 2020-12 <https://python-jsonschema.readthedocs.io/en/latest/validate/#jsonschema.Draft202012Validator>`_ and
`Draft 2019-09 <https://python-jsonschema.readthedocs.io/en/latest/validate/#jsonschema.Draft201909Validator>`_,
except for ``dynamicRef`` / ``recursiveRef`` and ``$vocabulary`` (in-progress).
Full support for
`Draft 7 <https://python-jsonschema.readthedocs.io/en/latest/validate/#jsonschema.Draft7Validator>`_,
`Draft 6 <https://python-jsonschema.readthedocs.io/en/latest/validate/#jsonschema.Draft6Validator>`_,
`Draft 4 <https://python-jsonschema.readthedocs.io/en/latest/validate/#jsonschema.Draft4Validator>`_
and
`Draft 3 <https://python-jsonschema.readthedocs.io/en/latest/validate/#jsonschema.Draft3Validator>`_
* `Lazy validation <https://python-jsonschema.readthedocs.io/en/latest/validate/#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-block:: bash
$ pip install jsonschema
Running the Test Suite
----------------------
If you have ``tox`` installed (perhaps via ``pip install tox`` or your
package manager), running ``tox`` in the directory of your source
checkout will run ``jsonschema``'s test suite on all of the versions
of Python ``jsonschema`` supports. If you don't have all of the
versions that ``jsonschema`` is tested under, you'll likely want to run
using ``tox``'s ``--skip-missing-interpreters`` option.
Of course you're also free to just run the tests on a single version with your
favorite test runner. The tests live in the ``jsonschema.tests`` package.
Benchmarks
----------
``jsonschema``'s benchmarks make use of `pyperf
<https://pyperf.readthedocs.io>`_. Running them can be done via::
$ tox -e perf
Community
---------
The JSON Schema specification has `a Slack
<https://json-schema.slack.com>`_, with an `invite link on its home page
<https://json-schema.org/>`_. Many folks knowledgeable on authoring
schemas can be found there.
Otherwise, asking questions on Stack Overflow is another means of
getting help if you're stuck.
Contributing
------------
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!
You can also generally find me on Libera (nick: ``Julian``) in various
channels, including ``#python``.
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-j
sonschema&utm_medium=referral&utm_campaign=readme>`_.

View File

@ -0,0 +1,69 @@
../../Scripts/jsonschema.exe,sha256=88NclWqfMyU9rGDBSoh0xRrJTnhxXnZQaIvW-0gFVoQ,106382
jsonschema-4.5.1.dist-info/COPYING,sha256=T5KgFaE8TRoEC-8BiqE0MLTxvHO0Gxa7hGw0Z2bedDk,1057
jsonschema-4.5.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
jsonschema-4.5.1.dist-info/METADATA,sha256=Nwk3xVLL4xvWZ9T_Ax-UMj8X0pZCvQn46AOtNArif_0,7831
jsonschema-4.5.1.dist-info/RECORD,,
jsonschema-4.5.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
jsonschema-4.5.1.dist-info/entry_points.txt,sha256=vO7rX4Fs_xIVJy2pnAtKgTSxfpnozAVQ0DjCmpMxnWE,51
jsonschema-4.5.1.dist-info/top_level.txt,sha256=jGoNS61vDONU8U7p0Taf-y_8JVG1Z2CJ5Eif6zMN_cw,11
jsonschema/__init__.py,sha256=h0l2RPVM9kimU7-jTSKoEnguV3QGvrrQvlnJN3F6UPk,1561
jsonschema/__main__.py,sha256=Sfz1ZNeogymj_KZxq6JXY3F6O_1v28sLIiskusifQ5s,40
jsonschema/__pycache__/__init__.cpython-310.pyc,,
jsonschema/__pycache__/__main__.cpython-310.pyc,,
jsonschema/__pycache__/_format.cpython-310.pyc,,
jsonschema/__pycache__/_legacy_validators.cpython-310.pyc,,
jsonschema/__pycache__/_reflect.cpython-310.pyc,,
jsonschema/__pycache__/_types.cpython-310.pyc,,
jsonschema/__pycache__/_utils.cpython-310.pyc,,
jsonschema/__pycache__/_validators.cpython-310.pyc,,
jsonschema/__pycache__/cli.cpython-310.pyc,,
jsonschema/__pycache__/exceptions.cpython-310.pyc,,
jsonschema/__pycache__/protocols.cpython-310.pyc,,
jsonschema/__pycache__/validators.cpython-310.pyc,,
jsonschema/_format.py,sha256=How0b-Ho7bgwXtSvzjAyrpZHk_5q8y9HF7T6OehXNzE,13103
jsonschema/_legacy_validators.py,sha256=-LlXuPD8n1vUI4PUxhLp5xMLPXQNl7PiL3KYQmulyco,7199
jsonschema/_reflect.py,sha256=qrE9u6y_d7MRIXWReN3Kiwkyytm3lQh6Pfdj9qvrbaY,4859
jsonschema/_types.py,sha256=_NDm3OxdPPWAqBSpfo4QVEA_oqfKMACg1QslVx0S900,5364
jsonschema/_utils.py,sha256=bJBFhFUOj8AZ9VilUVKUm6ur2Z81MqgjJJYuZ3i-9F4,10423
jsonschema/_validators.py,sha256=bRgXtl4UpD5lmy5qZOtwe92IJC-_2BbUx8oZzKDw4zE,15434
jsonschema/benchmarks/__init__.py,sha256=A0sQrxDBVHSyQ-8ru3L11hMXf3q9gVuB9x_YgHb4R9M,70
jsonschema/benchmarks/__pycache__/__init__.cpython-310.pyc,,
jsonschema/benchmarks/__pycache__/issue232.cpython-310.pyc,,
jsonschema/benchmarks/__pycache__/json_schema_test_suite.cpython-310.pyc,,
jsonschema/benchmarks/issue232.py,sha256=GKQBwm03sf-pPSxBxc4YDvBBnMYknOk6m-WtTntN5VE,506
jsonschema/benchmarks/json_schema_test_suite.py,sha256=PvfabpUYcF4_7csYDTcTauED8rnFEGYbdY5RqTXD08s,320
jsonschema/cli.py,sha256=LksDg0WhljKdElihzqQleTt4Zvl0vrhchZOzP4NoCM0,8135
jsonschema/exceptions.py,sha256=utvZjE7HBABp7w5XXWie0EksGpmKD-Hb2yfdOQ93eMM,10268
jsonschema/protocols.py,sha256=0nvipWEsFOlYzFf5LggYZDLtn7sVVwWSajnx2qG8nL0,6193
jsonschema/schemas/draft2019-09.json,sha256=e3YbPhIfCgyh6ioLjizIVrz4AWBLgmjXG6yqICvAwTs,1785
jsonschema/schemas/draft2020-12.json,sha256=Qdp29a-3zgYtJI92JGOpL3ykfk4PkFsiS6av7vkd7Q8,2452
jsonschema/schemas/draft3.json,sha256=2LanCgvBrUT8Eyk37KszzCjFxuOw0UBFOeS-ahb5Crg,2699
jsonschema/schemas/draft4.json,sha256=d-VZ-zmogXIypnObMGPT_e88TPZ9Zb40jd2-Fuvs9j4,4355
jsonschema/schemas/draft6.json,sha256=wp386fVINcOgbAOzxdXsDtp3cGVo-cTffPvHVmpRAG0,4437
jsonschema/schemas/draft7.json,sha256=PVOSCIJhYGxVm2A_OFMpyfGrRbXWZ-uZBodFOwVdQF4,4819
jsonschema/schemas/vocabularies.json,sha256=SW7oOta6bhkEdVDPBKgvrosztMW_UyKs-s04pgpgXqs,12845
jsonschema/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
jsonschema/tests/__pycache__/__init__.cpython-310.pyc,,
jsonschema/tests/__pycache__/_helpers.cpython-310.pyc,,
jsonschema/tests/__pycache__/_suite.cpython-310.pyc,,
jsonschema/tests/__pycache__/fuzz_validate.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_cli.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_deprecations.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_exceptions.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_format.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_jsonschema_test_suite.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_types.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_utils.cpython-310.pyc,,
jsonschema/tests/__pycache__/test_validators.cpython-310.pyc,,
jsonschema/tests/_helpers.py,sha256=3c-b9CK0cdGfhtuUhzM1AjtqPtR2VFvfcKC6G2g0a-0,157
jsonschema/tests/_suite.py,sha256=1uc_lOHcwxyfyL7DujRQMzPg3xvoQoVkg15ks3RwCjk,6482
jsonschema/tests/fuzz_validate.py,sha256=GeNlFQepS7ax7Sh90iISVYQXjUkPCUF0c20jEPgPx8s,1085
jsonschema/tests/test_cli.py,sha256=y52uBGTEgab6IhnTLSaA94xUTLLp3OKSQiy3qtiRMCQ,28674
jsonschema/tests/test_deprecations.py,sha256=paMq3Hd33zDfVsJpTd95MAOzI6y7IoUQ5brgp9qqVdU,3901
jsonschema/tests/test_exceptions.py,sha256=0kk-iWYLDG0dp9UuXDacdLORcS7j7b8qnhpC_KTdi2s,15614
jsonschema/tests/test_format.py,sha256=Gu4are4xUyRQc8YL0z-RlDOIc9_96ISv83hZRf8R2t0,3763
jsonschema/tests/test_jsonschema_test_suite.py,sha256=uw1_bBCPFfOgh995O4qwc4zH2Uz8ts2MxfmNEq1W0-I,13315
jsonschema/tests/test_types.py,sha256=DyvSKPtuaIu93Lkde80PkJkNOKgvCbaDYAfHz0yxyL0,6803
jsonschema/tests/test_utils.py,sha256=lJRVYyQeZQTUCTU_M3BhlkxPMgjsc8KQCd7U_Qkook8,3749
jsonschema/tests/test_validators.py,sha256=CNsjOb1_hJiHQDGnK66gaSxxfyGKJyhQKf6O9pDvUSQ,73491
jsonschema/validators.py,sha256=ew1y9iCuji_1YLTEnXn5LGNcGotj2qV2d7qXlARbryY,35466

View File

@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1,2 @@
[console_scripts]
jsonschema = jsonschema.cli:main

View File

@ -0,0 +1 @@
jsonschema