Automatic links from Python code examples to reference documentation at the flick of a switch! sphinx-codeautolink analyses the code in your documentation and inserts links to definitions that you use.
For a live demo, see our online documentation on Read The Docs.
Installation
sphinx-codeautolink can be installed from the Package Index via pip.
$ pip install 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.5.0
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.5.0.tar.gz | 34.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_codeautolink-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.4 kB
Release files / sphinx-codeautolink-0.5.0.tar.gz
| Download URL | sphinx-codeautolink-0.5.0.tar.gz |
|---|---|
| Size | 34.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fec2402805291cd5e0f47ea2f0ed75c4f3bd2ccd9c21a7985f30e1ab3a724cb
|
|
BLAKE2b-256 checksum How to use checksums |
63b094525ff1938de747c3e444a84e80daeedc1d064991cf6e718ccd2bdbc289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.4
|
Release files / sphinx_codeautolink-0.5.0-py3-none-any.whl
| Download URL | sphinx_codeautolink-0.5.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8b8cbaf52ad353a3f55593bd113cb56f65949195028407c0d5bc0031bc0371a
|
|
BLAKE2b-256 checksum How to use checksums |
998da61c20e1caaee15fc473f8e0edfa129940def20e50bf618e317755d1f1f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.4
|