Skip to main content

Build Status PyPI

sphinx-literalizer

sphinx-literalizer is a Sphinx extension for literalizer, which converts JSON, YAML, TOML, and JSON5 data structures to native language literal syntax (Python, TypeScript, Go, etc.).

Installation

Requires Python 3.12+.

pip install sphinx-literalizer

Usage

Add to your Sphinx conf.py:

extensions = [
    # ...
    "sphinx_literalizer",
]

Then use the literalizer directive in your .rst files:

.. literalizer:: path/to/data.json
   :language: python
   :wrap:

This reads the data file and renders its contents as a native Python literal in a code block. Input format is auto-detected from the file extension (.json, .yaml/.yml, .toml, .json5), or can be set explicitly with :input-format:.

Full documentation

See the full documentation for more information including how to contribute.

Metadata

Release files for sphinx-literalizer 2026.8.25

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

Source distribution (sdist)

Source distribution for sphinx-literalizer 2026.8.25
File Size Uploaded
sphinx_literalizer-2026.8.25.tar.gz 196.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-literalizer 2026.8.25
File Interpreter ABI Platform
sphinx_literalizer-2026.8.25-py3-none-any.whl Python 3 none any Details

Total release size: 215.4 kB

Release files / sphinx_literalizer-2026.8.25.tar.gz

Download URL sphinx_literalizer-2026.8.25.tar.gz
Size 196.4 kB
Tags Source
SHA-256 checksum
How to use checksums
09b7cb6e4e225d91fea1f44c8e8074a0ea0b136861a75df59ba89ebdf7d18b2f
BLAKE2b-256 checksum
How to use checksums
8355f11d259c2135169638e88cb0f75a83125985a0bbce6810be1d9b4504b2f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 25, 2026.

Transparency log

Release files / sphinx_literalizer-2026.8.25-py3-none-any.whl

Download URL sphinx_literalizer-2026.8.25-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f17dcd31c1ee2f9b6b7394f28f428628bca9f1797a061e30b46da8dc04f3f1a5
BLAKE2b-256 checksum
How to use checksums
ce2529df2d6647f5dd6ea814bd5106444499629491feda5e5f36eb33ff59045d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.8.25 This release

2 release files

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