Skip to main content

jsonschema-lexer

PyPI version Supported Python versions Build status

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)

Metadata

Release files for jsonschema-lexer 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsonschema-lexer 0.3.0
File Size Uploaded Provenance Actions
jsonschema_lexer-0.3.0.tar.gz 12.1 kB With provenance Details for jsonschema_lexer-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jsonschema-lexer 0.3.0
File Interpreter ABI Platform Actions
jsonschema_lexer-0.3.0-py3-none-any.whl Python 3 none any Details for jsonschema_lexer-0.3.0-py3-none-any.whl

Total release size: 21.8 kB

Release files / jsonschema_lexer-0.3.0.tar.gz

Download URL jsonschema_lexer-0.3.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cd0e63bcee6d9b6470d4e4963bf6bd24a208d619c895071708dbbbee6afb5f6d
BLAKE2b-256 checksum
How to use checksums
31da0fb7df72257986fc706a324d6eb05790b60492111c98a756e046b018c7de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2025.

Transparency log

Release files / jsonschema_lexer-0.3.0-py3-none-any.whl

Download URL jsonschema_lexer-0.3.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fda8187aa7348656df77decaf8f3931492818c082714cc7e3a26376d9587f67
BLAKE2b-256 checksum
How to use checksums
077f2e04eebdc90eea0eebf10d697fcd599eadf921e436caa2a43f46df747358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2025.

Transparency log

Security for jsonschema-lexer 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jsonschema_lexer-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 16, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page