Registry / serialization / sphinxcontrib-serializinghtml

sphinxcontrib-serializinghtml

JSON →
library2.0.0pypypi✓ verified 26d ago

sphinxcontrib-serializinghtml is a Sphinx extension that outputs "serialized" HTML files, specifically in JSON and Pickle formats. This enables external applications or custom post-processing tools to consume documentation content without needing to parse raw HTML. The library is currently at version 2.0.0 and follows a release cadence tied to Sphinx releases, with recent updates addressing dependency management and Python/Sphinx version compatibility.

pip install sphinxcontrib-serializinghtml
INSTALL
IMPORT
SIG · SPHINXCONTRIB-SERI
S
sphinxcontrib-serializinghtml
serializationpythonv2.0.0
Install
1.6s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sphinxcontrib.serializinghtml
# in conf.py extensions = [ 'sphinxcontrib.serializinghtml' ]
import sphinxcontrib.serializinghtml
This library is a Sphinx extension and should be enabled by adding its name (as a string) to the 'extensions' list in your Sphinx project's conf.py. Direct Python import statements are generally not used for enabling Sphinx extensions in conf.py, and historically caused circular import issues in older versions.

After installing the library, enable it by adding 'sphinxcontrib.serializinghtml' to the 'extensions' list in your Sphinx project's `conf.py`. Then, build your documentation using the 'json' or 'pickle' builder, which are provided by this extension.

# 1. Create a Sphinx project (if you don't have one): # sphinx-quickstart # 2. In your conf.py file, add the extension: # extensions = [ # 'sphinxcontrib.serializinghtml' # ] # 3. Build the documentation to JSON or Pickle format: # From your project root (where Makefile or make.bat is located): # make json # or # make pickle # Alternatively, using sphinx-build directly: # sphinx-build -b json -d _build/doctrees . _build/json # sphinx-build -b pickle -d _build/doctrees . _build/pickle
Debug
Known issues
breakingPython 3.5, 3.6, 3.7, and 3.8 support was dropped in version 1.1.6. Version 2.0.0 and later require Python >= 3.9.
fix
Upgrade your Python environment to 3.9 or newer.
affects: >=1.1.6
breakingThe minimum required Sphinx version was raised to 5.0 in `sphinxcontrib-serializinghtml` version 1.1.6. Using older Sphinx versions with recent `sphinxcontrib-serializinghtml` releases will likely result in errors.
fix
Ensure your Sphinx installation is version 5.0 or newer (e.g., `pip install -U Sphinx`).
affects: >=1.1.6
gotchaOlder versions (e.g., 1.1.1) of `sphinxcontrib-serializinghtml` experienced circular import issues if Sphinx was directly listed as a dependency, causing build failures. This was addressed in later 1.1.x versions, specifically version 1.1.10 removed Sphinx as a required direct dependency to prevent such conflicts.
fix
Upgrade to `sphinxcontrib-serializinghtml` version 1.1.10 or later to avoid this specific circular import problem.
affects: <1.1.10
gotchaThis extension provides special builders (`json` and `pickle`). To generate serialized output, you must explicitly use these builders (e.g., `make json` or `sphinx-build -b json`), not the default `html` builder. The output will be in `.fjson` and `.fpickle` files, not standard `.html`.
fix
When building your Sphinx project, use `make json` or `make pickle` (or `sphinx-build -b json` / `sphinx-build -b pickle`) to generate the desired serialized output.
affects: All versions
Upgrade
Version history
2.0.0latest on PyPI · released Jul 29, 2024
Audit
Dependencies
SphinxrequiredThis is a Sphinx extension; Sphinx is required to build documentation. Version 1.1.6 and later require Sphinx >= 5.0.
PythonrequiredRequires Python >= 3.9.
Agent activity
13 hits · last 30 days
node
10
Resources
sphinxcontrib-serializinghtml — pip install sphinxcontrib-serializinghtml · libregistry