jsonschema-lexer 0.3.0
pip install jsonschema-lexer
Released:
A Pygments lexer for JSON Schema
Navigation
Verified details
These details have been verified by PyPIProject links
GitHub Statistics
Maintainers
Unverified details
These details have not been verified by PyPIMeta
- Author: Julian Berman
- Tags json, jsonschema
- Requires: Python >=3.10
Classifiers
- Development Status
- Intended Audience
- Operating System
- Programming Language
- Topic
Project description
Introduction
jsonschema-lexer provides a lexer for syntax highlighting JSON Schema documents via Pygments.
Usage
Once installed, you can use it in your Python code to highlight JSON Schema documents.
Here’s a simple example:
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)
Project details
Verified details
These details have been verified by PyPIProject links
GitHub Statistics
Maintainers
Unverified details
These details have not been verified by PyPIMeta
- Author: Julian Berman
- Tags json, jsonschema
- Requires: Python >=3.10
Classifiers
- Development Status
- Intended Audience
- Operating System
- Programming Language
- Topic
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jsonschema_lexer-0.3.0.tar.gz
.
File metadata
- Download URL: jsonschema_lexer-0.3.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd0e63bcee6d9b6470d4e4963bf6bd24a208d619c895071708dbbbee6afb5f6d |
|
MD5 | dbd2514c01ec5a20fa033a5c87d9299d |
|
BLAKE2b-256 | 31da0fb7df72257986fc706a324d6eb05790b60492111c98a756e046b018c7de |
Provenance
The following attestation bundles were made for jsonschema_lexer-0.3.0.tar.gz
:
Publisher:
ci.yml
on python-jsonschema/jsonschema-lexer
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
jsonschema_lexer-0.3.0.tar.gz
- Subject digest:
cd0e63bcee6d9b6470d4e4963bf6bd24a208d619c895071708dbbbee6afb5f6d
- Sigstore transparency entry: 163016181
- Sigstore integration time:
- Permalink:
python-jsonschema/jsonschema-lexer@b28b61cc01d38322a164ab9ccbd347ef51a7268b
- Branch / Tag:
refs/tags/v0.3.0
- Owner: https://github.com/python-jsonschema
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
ci.yml@b28b61cc01d38322a164ab9ccbd347ef51a7268b
- Trigger Event:
push
- Statement type:
File details
Details for the file jsonschema_lexer-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: jsonschema_lexer-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fda8187aa7348656df77decaf8f3931492818c082714cc7e3a26376d9587f67 |
|
MD5 | 91b6026c05afd042441acbe52029f98a |
|
BLAKE2b-256 | 077f2e04eebdc90eea0eebf10d697fcd599eadf921e436caa2a43f46df747358 |
Provenance
The following attestation bundles were made for jsonschema_lexer-0.3.0-py3-none-any.whl
:
Publisher:
ci.yml
on python-jsonschema/jsonschema-lexer
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
jsonschema_lexer-0.3.0-py3-none-any.whl
- Subject digest:
2fda8187aa7348656df77decaf8f3931492818c082714cc7e3a26376d9587f67
- Sigstore transparency entry: 163016182
- Sigstore integration time:
- Permalink:
python-jsonschema/jsonschema-lexer@b28b61cc01d38322a164ab9ccbd347ef51a7268b
- Branch / Tag:
refs/tags/v0.3.0
- Owner: https://github.com/python-jsonschema
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
ci.yml@b28b61cc01d38322a164ab9ccbd347ef51a7268b
- Trigger Event:
push
- Statement type: