Skip to main content

A Sphinx extension for documenting configuration options.

Project description

sphinx-config-options

sphinx-config-options adds functionality to Sphinx that allows documenting configuration options with rich metadata and cross-referencing capabilities.

Basic usage

Documenting configuration options

Add configuration options to your documentation using the config:option directive:

.. config:option:: database.host
   :shortdesc: Database hostname or IP address
   :type: string
   :default: localhost
   :required: true

   The hostname or IP address of the database server to connect to.

Advanced option fields

The extension supports various metadata fields:

.. config:option:: cache.enabled
   :shortdesc: Enable or disable caching
   :type: boolean
   :default: false
   :scope: server
   :liveupdate: true
   :condition: Only available with premium license

   Controls whether the application uses caching to improve performance.

Cross-referencing options

Reference configuration options from anywhere in your documentation:

See the :config:option:`database.host` option for connection details.

Automatic index generation

All documented configuration options are automatically added to a searchable index available at {ref}config-options.

Project setup

sphinx-config-options is published on PyPI and can be installed with:

pip install sphinx-config-options

After adding sphinx-config-options to your Python project, update your Sphinx's conf.py file to include sphinx-config-options as one of its extensions:

extensions = [
    "sphinx_config_options"
]

Supported option fields

The extension supports the following metadata fields for configuration options:

  • shortdesc (required): Brief description of the option
  • type: Data type (string, boolean, integer, etc.)
  • default: Default value
  • defaultdesc: Description of the default value
  • initialvaluedesc: Description of the initial value
  • liveupdate: Whether the option can be changed at runtime
  • condition: Conditions under which the option is available
  • readonly: Whether the option is read-only
  • resource: Resource associated with the option
  • managed: Whether the option is managed by the system
  • required: Whether the option is required
  • scope: Scope of the option (server, client, etc.)

For more examples, see: https://linuxcontainers.org/lxd/docs/latest/networks/config_options_cheat_sheet.

Community and support

You can report any issues or bugs on the project's GitHub repository.

sphinx-config-options is covered by the Ubuntu Code of Conduct.

License and copyright

sphinx-config-options is released under the GPL-3.0 license.

© 2025 Canonical Ltd.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_config_options-0.1.0.tar.gz (108.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_config_options-0.1.0-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_config_options-0.1.0.tar.gz.

File metadata

  • Download URL: sphinx_config_options-0.1.0.tar.gz
  • Upload date:
  • Size: 108.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sphinx_config_options-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c0a4f218202a79d0eb0a8d90f026c01797d34217c5cc19dc62823c3c26ca293
MD5 98cf793c93566b4727bfe9a642c3e54b
BLAKE2b-256 251502e0a249e9587d8ab7a4a7d44ef1239d8ed2f5c9276490788ceceafb9c4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_config_options-0.1.0.tar.gz:

Publisher: release-publish.yaml on canonical/sphinx-config-options

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_config_options-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_config_options-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edd5dc53e704d19b16d3d9a1a6976448e1054c0a84600d73c80545a164808baf
MD5 f3353dee3a128291a2df372de2851233
BLAKE2b-256 652c40a7906e65568789f95b5dfa6b394316deac22eb587cfbe80a8a5f700c6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_config_options-0.1.0-py3-none-any.whl:

Publisher: release-publish.yaml on canonical/sphinx-config-options

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page