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.1.tar.gz (100.3 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.1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_config_options-0.1.1.tar.gz
  • Upload date:
  • Size: 100.3 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.1.tar.gz
Algorithm Hash digest
SHA256 6812f77e17517389bde9ff9fbe0643474f9d3d41a22598349f631904dc77b705
MD5 9a35d7545df069db755d8affa6a55e01
BLAKE2b-256 40df8f7588de165303c5919b1d1e48e02e9357ea0c32655a3aab47aa324c592c

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_config_options-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_config_options-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f56212a24b59ed0d6ae79fcf66fc6b6030d2e220b718acbff4929e115de74e07
MD5 f096b072da8673c60f080d768de367d4
BLAKE2b-256 9f36972ae10a6606116c97b70051bbb3943d2146af6ab0fc23f8c9002f468407

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_config_options-0.1.1-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