sphinxcontrib-requirements-txt
A sphinx extension to generate a rst/markdown to display the dependencies of
a python package from requirement.txt.
Usage
Take MyST as an example. rst is similar.
requirement.txt:
# To complete package names, a cache is needed.
# Every time you change template, the cache must be regenerated.
#
# ```shell
# $ pkgbuild-language-server --print-config cache
# /home/wzy/.cache/pacman.json
# ```
pyalpm
# See <https://wiki.archlinux.org/title/Namcap>.
git+git://gitlab.archlinux.org/pacman/namcap
docs/conf.py:
# ...
extensions = [
"myst_parser",
"sphinxcontrib.requirements_txt",
]
# ...
docs/index.md:
```{requirements} ../requirements.txt
```
Then:
cd docs && sphinx-build . _build/html
cd -
xdg-open docs/_build/html/index.html
A generated markdown will be inserted and rendered. You see:
Customize
```{requirements} /the/path/of/requirements.txt
---
title: Dependence
template: /the/path/of/template.j2
---
```
/the/path/of/requirements.txtcan be a glob expression.titlecan contain{title}, which will be converted to the base name of requirement file. Such asrequirements/dev.txtwill be converted todev.templateis a jinja2 file. See jinja2 syntax and examples.
Alternatives
Metadata
Release files for sphinxcontrib-requirements-txt 0.0.4
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 |
|---|---|---|---|---|
| sphinxcontrib-requirements-txt-0.0.4.tar.gz | 25.6 kB | Without provenance | Details for sphinxcontrib-requirements-txt-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinxcontrib_requirements_txt-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for sphinxcontrib_requirements_txt-0.0.4-py3-none-any.whl |
Total release size: 44.4 kB
Release files / sphinxcontrib-requirements-txt-0.0.4.tar.gz
| Download URL | sphinxcontrib-requirements-txt-0.0.4.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5375fc48c5b0c6ce0ef232e599ca509ffb986e1ed12269460511eeaeaaeda1e6
|
|
BLAKE2b-256 checksum How to use checksums |
150986a2e5de277b58d56e379600f21034fab5fc8df1c29e1f60c82041dce8e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / sphinxcontrib_requirements_txt-0.0.4-py3-none-any.whl
| Download URL | sphinxcontrib_requirements_txt-0.0.4-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b312e6ff740407c67b8d79d2b5dcbd8c9109d882bff1cb040e5f585303efd431
|
|
BLAKE2b-256 checksum How to use checksums |
caaee795d7562c7514bf1139debba320dc2d6bafea90c132c2665e9dec87f209
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for sphinxcontrib-requirements-txt 0.0.4
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.