Sourcecode on GitHubCode licenseDocumentation - Read Now!Documentation License
PyPI - TagPyPI - StatusPyPI - Python Version
GitHub Workflow - Build and Test StatusLibraries.io status for latest releaseCodacy - QualityCodacy - Line CoverageCodecov - Branch Coverage

The pyTooling.Sphinx Documentation

pyTooling.Sphinx adds roles and directives to Sphinx: styled inline text and line breaks working in HTML and LaTeX, condensed class interfaces, dependency tables generated from requirements files and the package index, badges, and schema graphs.

Other packages build on it: pyTooling.GitHub contributes the domain gha for GitHub Actions workflows, enabled as the extension pyTooling.GitHub.Sphinx.

Attention

pyTooling.Sphinx requires Python 3.12 or newer, because it requires Sphinx 9.1 and Sphinx 9.1 does.

The extension is enabled in conf.py:

# doc/conf.py
extensions = [
  ...,
  "pyTooling.Sphinx",
]

It links its stylesheet into every HTML page, appends its substitutions to rst_prolog, and sets up sphinx.ext.graphviz for the schema graphs.

Roles and Directives

Roles

Style roles

→ :red:, :underline:, :deletion: and more: CSS classes on inline text, with the stylesheet giving them their meaning.

Inline Python code

→ :pycode:, syntax-highlighted inline code.

Line break and horizontal rule

→ |br| and |hr|, in HTML and LaTeX.

Directives

condensed-class

→ A class’ public interface as one code block, parsed from its source.

dependency-table

→ A project’s dependencies with versions and licenses, from its requirements files and the package index.

jsonschema-graph

→ Planned: a JSON schema as a Graphviz graph.

xmlschema-graph

→ An XML schema as a Graphviz graph, drawn from the schema file.

shields

→ A project’s badges from shields.io, in rows.

Consumers

This layer is used by:

  • pyTooling.GitHub - its Sphinx domain gha builds on this extension, and its documentation uses it.

  • 🚧 pyTooling - its documentation, which still uses pyTooling’s own copy of this extension.

Contributors

License

This Python package (source code) is licensed under Apache License 2.0.
The accompanying documentation is licensed under Creative Commons - Attribution 4.0 (CC-BY 4.0).