Skip to main content

sphinx-skos

Tests Build Publish Coverage PyPI Development status Python Ruff Licence

A Sphinx extension that builds SKOS vocabularies into a documentation site. Point it at your vocabulary files and Sphinx publishes one page for every vocabulary, every concept and every collection, with the RDF for each page beside it.

Why

A controlled vocabulary is published so that people can read it and machines can resolve it. Each concept has a URI, and that URI should lead somewhere useful: a page a person can read, and the same concept in RDF for software that asks for it.

Most tools that render a SKOS vocabulary produce one long page for the whole vocabulary, or are a site generator of their own with their own templates and theming. sphinx-skos does neither. It turns each concept into an ordinary Sphinx document, so a vocabulary site is a Sphinx site: it can hold prose pages next to the generated ones, link between them, and look however its Sphinx theme makes it look.

Status

Early. The version is 0.0.1. The package installs and registers with Sphinx, but it does not yet read vocabularies or generate pages. The configuration below shows where it is going, not what it does today.

Planned usage

# conf.py
extensions = ["sphinx_skos"]
skos_vocabularies = ["../vocabularies/*.ttl"]
skos_base_uri = "https://w3id.org/example/vocabularies/"

Built with the dirhtml builder, a concept's page lives at its URI with skos_base_uri removed, so a redirect from the URI's domain to the site maps one address directly onto the other. Each page has Turtle, JSON-LD, RDF/XML and N-Triples copies beside it.

Scope & philosophy

What it is. A Sphinx extension that reads SKOS vocabulary files and turns them into Sphinx documents: one page per vocabulary, concept and collection, each with its RDF copies. It works for any vocabulary from any organisation.

What it is not.

  • Not a theme. Logos, colours, fonts and layout come from Sphinx's own theme settings in your conf.py: html_theme, html_logo, html_theme_options and the rest. The extension renders content only. Requests to add a logo, a colour scheme or a layout option to this package will be closed with a pointer to Sphinx's HTML theming documentation.
  • Not a vocabulary editor. The Turtle files are the source. The extension reads them and never writes them back.
  • Not a SKOS validator. It renders what the files say. Checking a vocabulary's quality is the job of tools built for it.
  • Not a server. It writes static files. Resolving a URI to a page is done by a redirect service such as w3id.org or by your web server.

When choices collide:

  1. The vocabulary files are the truth. A page shows what they say, and the RDF copies contain what they contain, without anything added or dropped.
  2. A concept's address never changes because the extension changed.
  3. Anything a site can set in Sphinx itself stays in Sphinx.

Prior art

pyLODE renders a SKOS vocabulary or an OWL ontology as HTML and is well maintained. It produces a single page per vocabulary, which does not give each concept a page of its own to resolve to. sphinx-skos exists for the one-page-per-concept case.

Contributing

See CONTRIBUTING.md. The rules every change follows are in CONSTITUTION.md.

License

MIT. See LICENSE.

Metadata

Release files for sphinx-skos 0.1.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 sphinx-skos 0.1.0
File Size Uploaded Provenance Actions
sphinx_skos-0.1.0.tar.gz 4.4 kB With provenance Details for sphinx_skos-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-skos 0.1.0
File Interpreter ABI Platform Actions
sphinx_skos-0.1.0-py3-none-any.whl Python 3 none any Details for sphinx_skos-0.1.0-py3-none-any.whl

Total release size: 8.9 kB

Release files / sphinx_skos-0.1.0.tar.gz

Download URL sphinx_skos-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
897bb0c03857549032cc3adaee36135560018c54f9ff53676faf3228278f3afb
BLAKE2b-256 checksum
How to use checksums
bbc3cc50d52936f0b5089d31dd16375c1eedfd67d4812151b3691ccdb136da08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / sphinx_skos-0.1.0-py3-none-any.whl

Download URL sphinx_skos-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20a57023a71f8bbd0d0ea74de8050fa2e06554ee72b8d9a14c0857af1f4e9258
BLAKE2b-256 checksum
How to use checksums
9119e822b98a502f9716dfa41580ca9a7e8fdc8a250376ad1597d34b07da9478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for sphinx-skos 0.1.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 sphinx_skos-0.1.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 Oct 28, 2026.

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