sphinx-codeautolink makes code examples clickable by inserting links from individual code elements to the corresponding reference documentation. We aim for a minimal setup assuming your examples are already valid Python.
For a live demo, see our online documentation on Read The Docs.
Installation
sphinx-codeautolink can be installed from the following sources:
$ pip install sphinx-codeautolink
# or, alternatively:
$ conda install -c conda-forge sphinx-codeautolink
Note that the library is in early development, so version pinning is advised. To enable sphinx-codeautolink, modify the extension list in conf.py. Note that the extension name uses an underscore rather than a hyphen.
extensions = [
...,
"sphinx_codeautolink",
]
That’s it! Now your code examples are linked. For ways of concatenating multiple examples and setting default import statements among other things, have a look at the online documentation.
Release files for sphinx-codeautolink 0.12.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx-codeautolink-0.12.1.tar.gz | 47.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_codeautolink-0.12.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 70.9 kB
Release files / sphinx-codeautolink-0.12.1.tar.gz
| Download URL | sphinx-codeautolink-0.12.1.tar.gz |
|---|---|
| Size | 47.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bef5c0fd4dcb78fe7899883f36666572dddb4f7012c508279f01a03f91a55b06
|
|
BLAKE2b-256 checksum How to use checksums |
a828f0c7d9abe494891efd7d61d1d2c9484026ac1a8bb1dddf09f26a30fcf019
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / sphinx_codeautolink-0.12.1-py3-none-any.whl
| Download URL | sphinx_codeautolink-0.12.1-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99a1300867d3dba555c19a402269606df0fd4700254565ab5a133eb2cf38bfae
|
|
BLAKE2b-256 checksum How to use checksums |
18d067602d5370708a87017d9caedfe60dab5a913bac2274880a4d2ed5525a32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|