sphinx-fakeinv: Generate fake Intersphinx inventory
Sometimes we create libraries so tiny that we don’t need write docs using Sphinx for them, but at the same time we may want to link them from other docs written using Sphinx.
This utility helps us to generate a fake objects.inv file (it’s also known as Sphinx inventory) so that other Sphinx docs can link it though the Intersphinx extension.
Installation
It’s uploaded to PyPI, so you can install it using pip:
$ pip install sphinx-fakeinv
Usage
Suppose you’ve just written a tiny module named foobar. You can generate a fake objects.inv for it by the following command:
$ sphinx-fakeinv foobar > objects.inv
The shinx-fakeinv program automatically scans the submodules, subpackages, and classes/functions/exceptions/variables in all of scanned modules/packages. (Note that it’s aware of __all__ list if there’s one.)
If you want to link it from other Sphinx docs, you need to manually add the url of it (of course you need to upload the generated fake objects.inv somewhere like gh-pages) to intersphinx_mapping configuration:
intersphinx_mapping = {
'foobar': (
'https://github.com/example/foobar', # The project website
'https://example.github.io/foobar/objects.inv' # The fake inventory
),
}
That’s done! If you make references to foobar e.g.:
If :mod:`foobar` module is available at runtime this function will uses
internally :func:`foobar.baz()`.
Links in the above example like foobar and foobar.baz() will refer to https://github.com/example/foobar.
Metadata
Release files for sphinx-fakeinv 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| sphinx-fakeinv-1.0.0.tar.gz | 4.2 kB | Without provenance | Details for sphinx-fakeinv-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_fakeinv-1.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for sphinx_fakeinv-1.0.0-py2.py3-none-any.whl |
Total release size: 12.4 kB
Release files / sphinx-fakeinv-1.0.0.tar.gz
| Download URL | sphinx-fakeinv-1.0.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a97800b2ba4c57b31eb44636445b3a1a60f63606d371869efcbc83fdd2255183
|
|
BLAKE2b-256 checksum How to use checksums |
82dc36e915fde5afdf91d0f5f26c2de25acb845e9e91e4f170ca3e27b8151bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sphinx_fakeinv-1.0.0-py2.py3-none-any.whl
| Download URL | sphinx_fakeinv-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b8a75be5368056308867e4da1f3b5ec758a1dc172109d5d87c3ec2bc3fc49bdc
|
|
BLAKE2b-256 checksum How to use checksums |
1a04bf3ea9fac1857fce99d833081ee5aed76568c97f529c178c11ecfab906de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sphinx-fakeinv 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.