{"id":13461706,"url":"https://github.com/python-jsonschema/jsonschema","last_synced_at":"2025-12-11T21:48:44.571Z","repository":{"id":2129526,"uuid":"3072629","full_name":"python-jsonschema/jsonschema","owner":"python-jsonschema","description":"An implementation of the JSON Schema specification for Python","archived":false,"fork":false,"pushed_at":"2025-12-09T12:51:03.000Z","size":3519,"stargazers_count":4893,"open_issues_count":45,"forks_count":602,"subscribers_count":55,"default_branch":"main","last_synced_at":"2025-12-10T22:15:08.059Z","etag":null,"topics":["json","json-schema","jsonschema","schema","validation"],"latest_commit_sha":null,"homepage":"https://python-jsonschema.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/python-jsonschema.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"Julian","tidelift":"pypi/jsonschema"}},"created_at":"2011-12-30T03:37:43.000Z","updated_at":"2025-12-09T21:57:07.000Z","dependencies_parsed_at":"2023-11-09T17:45:55.077Z","dependency_job_id":"66262358-fce9-4789-af83-b6bec6af2acc","html_url":"https://github.com/python-jsonschema/jsonschema","commit_stats":{"total_commits":2373,"total_committers":119,"mean_commits":"19.941176470588236","dds":0.2996207332490518,"last_synced_commit":"ba47f7f32014e67ec7dae58b924c9ebc0d89b173"},"previous_names":["julian/jsonschema"],"tags_count":110,"template":false,"template_full_name":null,"purl":"pkg:github/python-jsonschema/jsonschema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-jsonschema%2Fjsonschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-jsonschema%2Fjsonschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-jsonschema%2Fjsonschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-jsonschema%2Fjsonschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-jsonschema","download_url":"https://codeload.github.com/python-jsonschema/jsonschema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-jsonschema%2Fjsonschema/sbom","scorecard":{"id":75486,"data":{"date":"2025-08-04","repo":{"name":"github.com/python-jsonschema/jsonschema","commit":"980e09c5e262a16fc798f35dd1b3ef641c9d3298"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":7.9,"checks":[{"name":"Code-Review","score":2,"reason":"Found 2/7 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 12 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: .github/SECURITY.md:1","Info: Found linked content: .github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/SECURITY.md:1","Info: Found text in security policy: .github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:118","Info: found token with 'none' permissions: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/zizmor.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: MIT License: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: PythonAtherisFuzzer integration found: jsonschema/tests/fuzz_validate.py:49"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":8,"reason":"dependency not pinned by hash detected -- score normalized to 8","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/python-jsonschema/jsonschema/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/python-jsonschema/jsonschema/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/python-jsonschema/jsonschema/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/python-jsonschema/jsonschema/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/zizmor.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/python-jsonschema/jsonschema/zizmor.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/zizmor.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/python-jsonschema/jsonschema/zizmor.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   7 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v4.25.0 not signed: https://api.github.com/repos/python-jsonschema/jsonschema/releases/233556878","Warn: release artifact v4.24.1 not signed: https://api.github.com/repos/python-jsonschema/jsonschema/releases/233220698","Warn: release artifact v4.24.0 not signed: https://api.github.com/repos/python-jsonschema/jsonschema/releases/221069515","Warn: release artifact v4.23.0 not signed: https://api.github.com/repos/python-jsonschema/jsonschema/releases/164467042","Warn: release artifact v4.22.0 not signed: https://api.github.com/repos/python-jsonschema/jsonschema/releases/153575137","Warn: release artifact v4.25.0 does not have provenance: https://api.github.com/repos/python-jsonschema/jsonschema/releases/233556878","Warn: release artifact v4.24.1 does not have provenance: https://api.github.com/repos/python-jsonschema/jsonschema/releases/233220698","Warn: release artifact v4.24.0 does not have provenance: https://api.github.com/repos/python-jsonschema/jsonschema/releases/221069515","Warn: release artifact v4.23.0 does not have provenance: https://api.github.com/repos/python-jsonschema/jsonschema/releases/164467042","Warn: release artifact v4.22.0 does not have provenance: https://api.github.com/repos/python-jsonschema/jsonschema/releases/153575137"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:110"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (25) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T04:42:38.098Z","repository_id":2129526,"created_at":"2025-08-15T04:42:38.098Z","updated_at":"2025-08-15T04:42:38.098Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27654094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-schema","jsonschema","schema","validation"],"created_at":"2024-07-31T11:00:53.546Z","updated_at":"2025-12-11T21:48:44.564Z","avatar_url":"https://github.com/python-jsonschema.png","language":"Python","readme":"==========\njsonschema\n==========\n\n|PyPI| |Pythons| |CI| |ReadTheDocs| |Precommit| |Zenodo|\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema.svg\n   :alt: PyPI version\n   :target: https://pypi.org/project/jsonschema/\n\n.. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema.svg\n   :alt: Supported Python versions\n   :target: https://pypi.org/project/jsonschema/\n\n.. |CI| image:: https://github.com/python-jsonschema/jsonschema/workflows/CI/badge.svg\n  :alt: Build status\n  :target: https://github.com/python-jsonschema/jsonschema/actions?query=workflow%3ACI\n\n.. |ReadTheDocs| image:: https://readthedocs.org/projects/python-jsonschema/badge/?version=stable\u0026style=flat\n   :alt: ReadTheDocs status\n   :target: https://python-jsonschema.readthedocs.io/en/stable/\n\n.. |Precommit| image:: https://results.pre-commit.ci/badge/github/python-jsonschema/jsonschema/main.svg\n   :alt: pre-commit.ci status\n   :target: https://results.pre-commit.ci/latest/github/python-jsonschema/jsonschema/main\n\n.. |Zenodo| image:: https://zenodo.org/badge/3072629.svg\n   :alt: Zenodo DOI\n   :target: https://zenodo.org/badge/latestdoi/3072629\n\n\n``jsonschema`` is an implementation of the `JSON Schema \u003chttps://json-schema.org\u003e`_ specification for Python.\n\n.. code:: python\n\n    \u003e\u003e\u003e from jsonschema import validate\n\n    \u003e\u003e\u003e # A sample schema, like what we'd get from json.load()\n    \u003e\u003e\u003e schema = {\n    ...     \"type\" : \"object\",\n    ...     \"properties\" : {\n    ...         \"price\" : {\"type\" : \"number\"},\n    ...         \"name\" : {\"type\" : \"string\"},\n    ...     },\n    ... }\n\n    \u003e\u003e\u003e # If no exception is raised by validate(), the instance is valid.\n    \u003e\u003e\u003e validate(instance={\"name\" : \"Eggs\", \"price\" : 34.99}, schema=schema)\n\n    \u003e\u003e\u003e validate(\n    ...     instance={\"name\" : \"Eggs\", \"price\" : \"Invalid\"}, schema=schema,\n    ... )                                   # doctest: +IGNORE_EXCEPTION_DETAIL\n    Traceback (most recent call last):\n        ...\n    ValidationError: 'Invalid' is not of type 'number'\n\nIt can also be used from the command line by installing `check-jsonschema \u003chttps://github.com/python-jsonschema/check-jsonschema\u003e`_.\n\nFeatures\n--------\n\n* Full support for `Draft 2020-12 \u003chttps://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft202012Validator\u003e`_, `Draft 2019-09 \u003chttps://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft201909Validator\u003e`_, `Draft 7 \u003chttps://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft7Validator\u003e`_, `Draft 6 \u003chttps://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft6Validator\u003e`_, `Draft 4 \u003chttps://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft4Validator\u003e`_ and `Draft 3 \u003chttps://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/validators/#jsonschema.validators.Draft3Validator\u003e`_\n\n* `Lazy validation \u003chttps://python-jsonschema.readthedocs.io/en/latest/api/jsonschema/protocols/#jsonschema.protocols.Validator.iter_errors\u003e`_ that can iteratively report *all* validation errors.\n\n* `Programmatic querying \u003chttps://python-jsonschema.readthedocs.io/en/latest/errors/\u003e`_ of which properties or items failed validation.\n\n\nInstallation\n------------\n\n``jsonschema`` is available on `PyPI \u003chttps://pypi.org/project/jsonschema/\u003e`_. You can install using `pip \u003chttps://pip.pypa.io/en/stable/\u003e`_:\n\n.. code:: bash\n\n    $ pip install jsonschema\n\n\nExtras\n======\n\nTwo extras are available when installing the package, both currently related to ``format`` validation:\n\n    * ``format``\n    * ``format-nongpl``\n\nThey can be used when installing in order to include additional dependencies, e.g.:\n\n.. code:: bash\n\n    $ pip install jsonschema'[format]'\n\nBe 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).\nPlease read the `format validation documentation \u003chttps://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats\u003e`_ for further details.\n\n.. start cut from PyPI\n\nRunning the Test Suite\n----------------------\n\nIf you have ``nox`` installed (perhaps via ``pipx install nox`` or your package manager), running ``nox`` in the directory of your source checkout will run ``jsonschema``'s test suite on all of the versions of Python ``jsonschema`` supports.\nIf you don't have all of the versions that ``jsonschema`` is tested under, you'll likely want to run using ``nox``'s ``--no-error-on-missing-interpreters`` option.\n\nOf course you're also free to just run the tests on a single version with your favorite test runner.\nThe tests live in the ``jsonschema.tests`` package.\n\n\nBenchmarks\n----------\n\n``jsonschema``'s benchmarks make use of `pyperf \u003chttps://pyperf.readthedocs.io\u003e`_.\nRunning them can be done via::\n\n      $ nox -s perf\n\n\nCommunity\n---------\n\nThe JSON Schema specification has `a Slack \u003chttps://json-schema.slack.com\u003e`_, with an `invite link on its home page \u003chttps://json-schema.org/\u003e`_.\nMany folks knowledgeable on authoring schemas can be found there.\n\nOtherwise, opening a `GitHub discussion \u003chttps://github.com/python-jsonschema/jsonschema/discussions\u003e`_ or asking questions on Stack Overflow are other means of getting help if you're stuck.\n\n.. end cut from PyPI\n\n\nAbout\n-----\n\nI'm Julian Berman.\n\n``jsonschema`` is on `GitHub \u003chttps://github.com/python-jsonschema/jsonschema\u003e`_.\n\nGet in touch, via GitHub or otherwise, if you've got something to contribute, it'd be most welcome!\n\nIf you feel overwhelmingly grateful, you can also `sponsor me \u003chttps://github.com/sponsors/Julian/\u003e`_.\n\nAnd for companies who appreciate ``jsonschema`` and its continued support and growth, ``jsonschema`` is also now supportable via `TideLift \u003chttps://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema\u0026utm_medium=referral\u0026utm_campaign=readme\u003e`_.\n","funding_links":["https://github.com/sponsors/Julian","https://tidelift.com/funding/github/pypi/jsonschema","https://github.com/sponsors/Julian/","https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema\u0026utm_medium=referral\u0026utm_campaign=readme"],"categories":["Python","Data Validation","Data Format \u0026 I/O","数据验证","HarmonyOS","json","JSON Schema Validators","\u003ca name=\"Python\"\u003e\u003c/a\u003ePython"],"sub_categories":["Productivity","For Python","Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-jsonschema%2Fjsonschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-jsonschema%2Fjsonschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-jsonschema%2Fjsonschema/lists"}