GitHub
github.com › python-jsonschema › jsonschema
GitHub - python-jsonschema/jsonschema: An implementation of the JSON Schema specification for Python · GitHub
An implementation of the JSON Schema specification for Python - python-jsonschema/jsonschema
Starred by 4.9K users
Forked by 610 users
Languages Python 99.8% | TypeScript 0.2%
Videos
Validate JSON Schema Using jsonschema Library
13:45
JSON Schema Validation in Python: Bring Structure Into JSON - YouTube
17:13
01 - Intro to JSON-schema validation in python and JavaScript || ...
17:13
Intro to JSON Schema Validation in Python & JavaScript (AJV & ...
- YouTube
01:31
Python - JSON file to Schema - YouTube
Horejsek
horejsek.github.io › python-fastjsonschema
Fast JSON schema for Python — fastjsonschema documentation
Example: import fastjsonschema code = fastjsonschema.compile_to_code({'type': 'string'}) with open('your_file.py', 'w') as f: f.write(code) ... echo "{'type': 'string'}" | python3 -m fastjsonschema > your_file.py python3 -m fastjsonschema "{'type': 'string'}" > your_file.py · Exception ...
GitHub
github.com › cwacek › python-jsonschema-objects
GitHub - cwacek/python-jsonschema-objects: Automatic Python binding generation from JSON Schemas · GitHub
python-jsonschema-objects provides an automatic class-based binding to JSON Schemas for use in python. See Draft Schema Support to see supported keywords · For example, given the following schema: { "title": "Example Schema", "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "age": { "description": "Age in years", "type": "integer", "minimum": 0 }, "dogs": { "type": "array", "items": {"type": "string"}, "maxItems": 4 }, "address": { "type": "object", "properties": { "street": {"type": "string"}, "city": {"type": "string"}, "state": {"type": "string"} }, "required":["street", "city"] }, "gender": { "type": "string", "enum": ["male", "female"] }, "deceased": { "enum": ["yes", "no", 1, 0, "true", "false"] } }, "required": ["firstName", "lastName"] } jsonschema-objects can generate a class based binding.
Starred by 373 users
Forked by 90 users
Languages Python
GitHub
github.com › python-jsonschema › jsonschema-specifications
GitHub - python-jsonschema/jsonschema-specifications: Support files exposing JSON from the JSON Schema specifications to Python
JSON support files from the JSON Schema Specifications (metaschemas, vocabularies, etc.), packaged for runtime access from Python as a referencing-based Schema Registry.
Starred by 12 users
Forked by 11 users
Languages Python 100.0% | Python 100.0%
GitHub
github.com › onyxfish › jsonschema
GitHub - onyxfish/jsonschema: A Python implementation of the JSON Schema validator described at http://www.json-schema.org/. MIT Copyright (c) 2008 Ian Lewis, Yusuke Muraoka.
Length of 'simplejson' must be more than 15.000000 EXTENDING JSONSCHEMA jsonschema provides an API similar to simplejson in that validators can be overridden to support special property support or extended functionality. Samples of how jsonschema can be extended can be found in the examples directory.
Starred by 16 users
Forked by 4 users
Languages Python 99.6% | JavaScript 0.4% | Python 99.6% | JavaScript 0.4%
GitHub
github.com › keleshev › schema
GitHub - keleshev/schema: Schema validation just got Pythonic · GitHub
The output is a Python dict, you need to dump it to JSON. >>> from schema import Optional, Schema >>> import json >>> s = Schema({ ... "test": str, ... "nested": {Optional("other"): str}, ... }) >>> json_schema = json.dumps(s.json_schema("https://example.com/my-schema.json")) # json_schema { "type":"object", "properties": { "test": {"type": "string"}, "nested": { "type":"object", "properties": { "other": {"type": "string"} }, "required": [], "additionalProperties": false } }, "required":[ "test", "nested" ], "additionalProperties":false, "$id":"https://example.com/my-schema.json", "$schema":"http://json-schema.org/draft-07/schema#" }
Starred by 2.9K users
Forked by 217 users
Languages Python
GitHub
github.com › python-jsonschema › hypothesis-jsonschema
GitHub - python-jsonschema/hypothesis-jsonschema: Tools to generate test data from JSON schemata with Hypothesis · GitHub
from hypothesis import given from hypothesis_jsonschema import from_schema @given(from_schema({"type": "integer", "minimum": 1, "exclusiveMaximum": 10})) def test_integers(value): assert isinstance(value, int) assert 1 <= value < 10 @given( from_schema( {"type": "string", "format": "card"}, # Standard formats work out of the box. Custom formats are ignored # by default, but you can pass custom strategies for them - e.g. custom_formats={"card": st.sampled_from(EXAMPLE_CARD_NUMBERS)}, ) ) def test_card_numbers(value): assert isinstance(value, str) assert re.match(r"^\d{4} \d{4} \d{4} \d{4}$", va
Starred by 279 users
Forked by 36 users
Languages Python
PyPI
pypi.org › project › jsonschema
jsonschema · PyPI
jsonschema is available on PyPI. You can install using pip: ... 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 for further details. I’m Julian Berman. ... Get in touch, via GitHub or otherwise, if you’ve got something to contribute, it’d be most welcome!
» pip install jsonschema
GitHub
github.com › horejsek › python-fastjsonschema
GitHub - horejsek/python-fastjsonschema: Fast JSON schema validator for Python.
Fast JSON schema validator for Python. Contribute to horejsek/python-fastjsonschema development by creating an account on GitHub.
Starred by 488 users
Forked by 76 users
Languages Python 98.7% | Makefile 1.3% | Python 98.7% | Makefile 1.3%
GitHub
github.com › python-jsonschema › jsonschema › blob › main › jsonschema › validators.py
jsonschema/jsonschema/validators.py at main · python-jsonschema/jsonschema
"https://github.com/python-jsonschema/referencing " "library, which provides more compliant referencing " "behavior as well as more flexible APIs for " "customization." ), DeprecationWarning, stacklevel=2, ) if self._ref_resolver is None: self._ref_resolver = _RefResolver.from_schema( self.schema, id_of=id_of, ) return self._ref_resolver ·
Author python-jsonschema
GitHub
github.com › Julian › jsonschema › releases
Releases · python-jsonschema/jsonschema
Releases · python-jsonschema/jsonschema · 07 Jan 13:41 · github-actions · v4.26.0 · a727743 · This commit was signed with the committer’s verified signature. Julian Julian Berman · SSH Key Fingerprint: KGWaiXaE2+2Sfsb1tqFbCB97kWnz9D41YojdMdVPq9M · Verified · Learn about vigilant mode.
Author python-jsonschema
GitHub
github.com › python-jsonschema › referencing
GitHub - python-jsonschema/referencing: Cross-specification JSON referencing (JSON Schema, OpenAPI, and the one you just made up!) · GitHub
Cross-specification JSON referencing (JSON Schema, OpenAPI, and the one you just made up!) - python-jsonschema/referencing
Starred by 52 users
Forked by 21 users
Languages Python
GitHub
github.com › python-jsonschema › check-jsonschema
GitHub - python-jsonschema/check-jsonschema: A CLI and set of pre-commit hooks for jsonschema validation with built-in support for GitHub Workflows, Renovate, Azure Pipelines, and more! · GitHub
The following configuration uses check-jsonschema to validate Github Workflow files. - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.37.0 hooks: - id: check-github-workflows args: ["--verbose"]
Starred by 305 users
Forked by 59 users
Languages Python 99.8% | Just 0.2%
GitHub
github.com › python-jsonschema › jsonschema-lexer
GitHub - python-jsonschema/jsonschema-lexer: A Pygments lexer for JSON Schema
Once installed, you can use it in your Python code to highlight JSON Schema documents. ... from jsonschema_lexer import JSONSchemaLexer from rich.console import Console from rich.syntax import Syntax console = Console() code = """ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/product.schema.json", "title": "Product", "description": "A product from Acme's catalog", "type": "object", "properties": { "productId": { "description": "The unique identifier for a product", "type": "integer" }, "productName": { "description": "Name of the product", "type": "string" } } } """ syntax = Syntax(code, lexer=JSONSchemaLexer(), background_color="default", word_wrap=True) console.print(syntax)
Author python-jsonschema
jsonschema
python-jsonschema.readthedocs.io
jsonschema 4.26.0 documentation
jsonschema’s benchmarks make use of pyperf. Running them can be done via: ... The JSON Schema specification has a Slack, with an invite link on its home page. Many folks knowledgeable on authoring schemas can be found there. Otherwise, opening a GitHub discussion or asking questions on Stack Overflow are other means of getting help if you’re stuck.
GitHub
github.com › marksparkza › jschon
GitHub - marksparkza/jschon: An object-oriented JSON Schema implementation for Python.
I'm Mark, and this is my personal Python-powered project. Work on jschon is currently on hold due to other commitments. Development will resume as and when time allows. JSON Schema validator implementation (drafts 2019-09, 2020-12) ... For remote $ref support, the requests library is required. It may be installed with: ... from jschon import create_catalog, JSON, JSONSchema create_catalog('2020-12') demo_schema = JSONSchema({ "$id": "https://example.com/demo", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "anyOf": [ { "type": "string", "description": "Cool!
Starred by 143 users
Forked by 12 users
Languages Python 100.0% | Python 100.0%
GitHub
github.com › altair-viz › schemapi
GitHub - altair-viz/schemapi: Auto-generate Python APIs from JSON schema specifications
July 23, 2020 - The result of this is that a new Python module named myschema.py is written to disk in the local directory; we can import the root object and use it to construct some data: >>> from myschema import Person >>> person = Person(name='suzie', age=32) ...
Starred by 79 users
Forked by 12 users
Languages Python 82.4% | Jupyter Notebook 17.4% | Makefile 0.2% | Python 82.4% | Jupyter Notebook 17.4% | Makefile 0.2%
GitHub
github.com › orgs › python-jsonschema › repositories
python-jsonschema repositories · GitHub
JSON Schema implementation and surrounding tooling for Python - Python + JSON Schema