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.0.1.tar.gz (75.6 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.0.1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_config_options-0.0.1.tar.gz
  • Upload date:
  • Size: 75.6 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.0.1.tar.gz
Algorithm Hash digest
SHA256 596ae7d1471ae0b3ddb5cf81410675d2b2b591c10ac87981c1a9834fde4ef4f5
MD5 327d12e3dc399487edf56982009268d7
BLAKE2b-256 5f0aa42f95d2b61b2ced04b3e0dabd475403cfe840939aeeae2f35e98f6961c9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for sphinx_config_options-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b96412d87310d92bc9a62fb7f7b50d53f759e2a3e9cab02b5816ea7d6715566d
MD5 7be23e8330b275a069827a47a2881e8e
BLAKE2b-256 e89d2d0644622fa1361d863612040830b96cc72b5af602847bed87504898c5f4

See more details on using hashes here.

Provenance

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