This package provides convenient utilities and data to write a sphinx config file.
Project description
Intersphinx Registry
A simple utility package that provides a default intersphinx mapping for a large chunk of the Python ecosystem.
Installation
# Core package only (for use in conf.py/Sphinx projects)
pip install intersphinx_registry
# With a command-line interface
pip install intersphinx_registry[cli]
# or
uv tool install intersphinx_registry[cli]
# or
pipx install intersphinx_registry[cli]
You can also use it without installation:
uvx intersphinx-registry[cli] lookup numpy,scipy array
Usage in conf.py
from intersphinx_registry import get_intersphinx_mapping
# ...
intersphinx_mapping = get_intersphinx_mapping(
packages={"ipython", "matplotlib", "pandas", "python"}
)
intersphinx_mapping.update({
'overwrite': ('<url>', None),
'my-package': ('<url>', None),
})
Command-line interface
The package provides a command-line interface for looking up intersphinx targets.
[!NOTE] The CLI requires installing the
[cli]extra:pip install intersphinx_registry[cli]
$ intersphinx-registry --version
# or
$ intersphinx-registry -v
quick lookup
You can use the lookup command to search for intersphinx targets and webpages across various packages.
Call without arguments to get help:
$ intersphinx-registry lookup
Basic usage:
$ intersphinx-registry lookup <package>[,package] [search_term]
Examples:
$ intersphinx-registry lookup numpy,scipy array
$ intersphinx-registry lookup ipython formatters.html
You can search multiple packages at once:
$ intersphinx-registry lookup numpy,scipy Universal
std:label ufuncs NumPy 2.1 'Universal functions (ufunc)' https://numpy.org/doc/stable/reference/ufuncs.html#ufuncs
std:label ufuncs-basics NumPy 2.1 'Universal functions (ufunc) basics' https://numpy.org/doc/stable/user/basics.ufuncs.html#ufuncs-basics
std:label ufuncs-internals NumPy 2.1 'Universal functions' https://numpy.org/doc/stable/dev/internals.code-explanations.html#ufuncs-internals
std:doc reference/ufuncs NumPy 2.1 'Universal functions (ufunc)' https://numpy.org/doc/stable/reference/ufuncs.html
std:doc user/basics.ufuncs NumPy 2.1 'Universal functions (ufunc) basics' https://numpy.org/doc/stable/user/basics.ufuncs.html
std:label non-uniform-random-number-sampling SciPy 1.14.1 'Universal Non-Uniform Random Number Sampling in SciPy' https://docs.scipy.org/doc/scipy/tutorial/stats/sampling.html#non-uniform-random-number-sampling
std:doc tutorial/stats/sampling SciPy 1.14.1 'Universal Non-Uniform Random Number Sampling in SciPy' https://docs.scipy.org/doc/scipy/tutorial/stats/sampling.html
[!WARNING] There is no cache; the lookup command downloads the inventory of each mentioned package every time.
You can also use the lookup functionality via the module interface:
$ python -m intersphinx_registry.lookup <package>[,package] [search_term]
reverse-lookup
Find which package a documentation URL belongs to and get its Sphinx reference.
$ intersphinx-registry reverse-lookup <url> [url...]
Examples:
$ intersphinx-registry reverse-lookup https://numpy.org/doc/stable/reference/arrays.html
$ intersphinx-registry reverse-lookup https://docs.python.org/3/ https://numpy.org/doc/stable/
This is useful when you have a link to documentation and want to know the corresponding Sphinx reference (:domain:package:target) that you can use in your own documentation with intersphinx.
rev-search
Scan .rst files in a directory for hardcoded URLs and suggest replacements with Sphinx references.
$ intersphinx-registry rev-search <directory-or-file>
Examples:
$ intersphinx-registry rev-search docs/
$ intersphinx-registry rev-search docs/index.rst
This command helps you convert hardcoded URLs in your reStructuredText documentation into proper intersphinx references. It scans your documentation files, finds URLs that match known packages in the registry, and shows you a diff-style output of the suggested changes.
Why ?
Sometimes, packages docs move and it's hard to keep track of them. We try to keep the registry up to date, so you do not have to ask yourself questions and update your intersphinx-mapping.
You also might not want to think about adding intersphinx mapping when you refer to dependencies.
A package url is wrong !
Please send a PR updating only this package in the registry.json. We try to
link only to stable package, not dev versions.
A package is missing !
We can't do all packages, but if you think a package is widely used and missing, please send a PR.
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 intersphinx_registry-0.2605.27.tar.gz.
File metadata
- Download URL: intersphinx_registry-0.2605.27.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c39b2d9c59da18b7e96090768ff2f610b8cbb45aa047c2767e27b1954d3f8bcf
|
|
| MD5 |
7381ad7e7e0700be0c3bf8b96c0f20ff
|
|
| BLAKE2b-256 |
60b9eeafa901eedf718cd4ecca8db83d1def1bd38a4edf8ca33a776f1bcd19d2
|
Provenance
The following attestation bundles were made for intersphinx_registry-0.2605.27.tar.gz:
Publisher:
publish.yml on Quansight-Labs/intersphinx_registry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intersphinx_registry-0.2605.27.tar.gz -
Subject digest:
c39b2d9c59da18b7e96090768ff2f610b8cbb45aa047c2767e27b1954d3f8bcf - Sigstore transparency entry: 1393361507
- Sigstore integration time:
-
Permalink:
Quansight-Labs/intersphinx_registry@15f495bd1bf6c2775332a7b613aac894ab28a9bb -
Branch / Tag:
refs/tags/0.2705.27 - Owner: https://github.com/Quansight-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@15f495bd1bf6c2775332a7b613aac894ab28a9bb -
Trigger Event:
push
-
Statement type:
File details
Details for the file intersphinx_registry-0.2605.27-py2.py3-none-any.whl.
File metadata
- Download URL: intersphinx_registry-0.2605.27-py2.py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d85ffbe9090e352d725571bb8c4bfa0cbdf9d8eb8cdaf8f0f3e7f70d023032f1
|
|
| MD5 |
828388624937adcd2556f6a04ae115c0
|
|
| BLAKE2b-256 |
294028f910bfe21569a087f42c51960b2a5cdc87c7d0f7e4d736ea4413f53a16
|
Provenance
The following attestation bundles were made for intersphinx_registry-0.2605.27-py2.py3-none-any.whl:
Publisher:
publish.yml on Quansight-Labs/intersphinx_registry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intersphinx_registry-0.2605.27-py2.py3-none-any.whl -
Subject digest:
d85ffbe9090e352d725571bb8c4bfa0cbdf9d8eb8cdaf8f0f3e7f70d023032f1 - Sigstore transparency entry: 1393361529
- Sigstore integration time:
-
Permalink:
Quansight-Labs/intersphinx_registry@15f495bd1bf6c2775332a7b613aac894ab28a9bb -
Branch / Tag:
refs/tags/0.2705.27 - Owner: https://github.com/Quansight-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@15f495bd1bf6c2775332a7b613aac894ab28a9bb -
Trigger Event:
push
-
Statement type: