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 optiontype: Data type (string, boolean, integer, etc.)default: Default valuedefaultdesc: Description of the default valueinitialvaluedesc: Description of the initial valueliveupdate: Whether the option can be changed at runtimecondition: Conditions under which the option is availablereadonly: Whether the option is read-onlyresource: Resource associated with the optionmanaged: Whether the option is managed by the systemrequired: Whether the option is requiredscope: 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6812f77e17517389bde9ff9fbe0643474f9d3d41a22598349f631904dc77b705
|
|
| MD5 |
9a35d7545df069db755d8affa6a55e01
|
|
| BLAKE2b-256 |
40df8f7588de165303c5919b1d1e48e02e9357ea0c32655a3aab47aa324c592c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_config_options-0.1.1.tar.gz -
Subject digest:
6812f77e17517389bde9ff9fbe0643474f9d3d41a22598349f631904dc77b705 - Sigstore transparency entry: 1087921371
- Sigstore integration time:
-
Permalink:
canonical/sphinx-config-options@27ca58011dd396b5fe477d7687fd0a70d22dd28c -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release-publish.yaml@27ca58011dd396b5fe477d7687fd0a70d22dd28c -
Trigger Event:
push
-
Statement type:
File details
Details for the file sphinx_config_options-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sphinx_config_options-0.1.1-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f56212a24b59ed0d6ae79fcf66fc6b6030d2e220b718acbff4929e115de74e07
|
|
| MD5 |
f096b072da8673c60f080d768de367d4
|
|
| BLAKE2b-256 |
9f36972ae10a6606116c97b70051bbb3943d2146af6ab0fc23f8c9002f468407
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_config_options-0.1.1-py3-none-any.whl -
Subject digest:
f56212a24b59ed0d6ae79fcf66fc6b6030d2e220b718acbff4929e115de74e07 - Sigstore transparency entry: 1087921449
- Sigstore integration time:
-
Permalink:
canonical/sphinx-config-options@27ca58011dd396b5fe477d7687fd0a70d22dd28c -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release-publish.yaml@27ca58011dd396b5fe477d7687fd0a70d22dd28c -
Trigger Event:
push
-
Statement type: