Docrepr
Docrepr renders Python docstrings to HTML with Sphinx.
It can generate rich and plain representations of docstrings, alongside additional metadata about the object to which the docstring belongs.
It is based on the sphinxify module developed by Tim Dumol for the Sage Notebook and the utils.help module developed by Carlos Cordoba for the Spyder IDE.
See spyder-ide/docrepr#20 for the full history.
Rationale
For more on the motivation and design behind Docrepr, see this presentation by Carlos Cordoba at SciPy 2015:
Details
The module renders a dictionary as returned by IPython oinspect module into a full HTML page (with all assets) from an object's docstring, by using the rich_repr function of its sphinxify submodule.
Example of use
import webbrowser
import numpy as np
from IPython.core.oinspect import Inspector # oinfo generator
import docrepr # Set module options
from docrepr import sphinxify # html generator
oinfo = Inspector().info(np.sin)
oinfo['name'] = 'sin'
url = sphinxify.rich_repr(oinfo)
webbrowser.open_new_tab(url)
License
This project is distributed under the under the terms of the BSD 3-Clause License.
Metadata
Release files for docrepr 0.2.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 | |
|---|---|---|---|---|
| docrepr-0.2.0.tar.gz | 145.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docrepr-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 293.2 kB
Release files / docrepr-0.2.0.tar.gz
| Download URL | docrepr-0.2.0.tar.gz |
|---|---|
| Size | 145.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ad62ecdaa0b7ab90dcd9c29abc98cae7d61d09339f18396d4ca5b8ab41c8b90
|
|
BLAKE2b-256 checksum How to use checksums |
e59c09842655e1ac504cf1cbc78a35533d9d02f4245fa608ea8028c6aa18dc43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / docrepr-0.2.0-py3-none-any.whl
| Download URL | docrepr-0.2.0-py3-none-any.whl |
|---|---|
| Size | 147.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbee26975f939495a66eb54a3c45849b23eec370d3b89f3bcb6f1a7a6153d4a1
|
|
BLAKE2b-256 checksum How to use checksums |
d717f6a000caccf0f84a9c5fed8989aad7260a970cd5efdcfeb04d4b52439bf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for docrepr 0.2.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.